Ontology and mathematics in quantum field theories and in quantum mechanics