Your question is unclear. If your question is about practical concerns, I'm not exactly sure what you are asking. Can you define gauge symmetry in Lean or Coq? Also Almost certainly yes! It shouldn't be harder than any other similar area of mathematics.
Can you enumerate the theorems that mention your new concept GaugeSymmetry
? I guess, but you would get a bunch of junk like GaugeSymmetry = GaugeSymmetry
and (forall∀ (x : GaugeSymmetry), 1=0 -> True
. And even without stuff quite so silly, I would be surprised if you find a good solution to this combinatorial explosion.
I think there is some confusion on the terminology of "theory", or of how Lean or Coq is typically used.
Another use case of the terminology "theory" is when one has a completely formal semantics of some mathematical notion. A recent example of this is homotopy type theory, which is a formal language for working directly in something like the infinity groupoid formed by homotopy spaces (I'm probably messing this up). This allows one to do synthetic homotopy theory, proving things about say the homotopy groups of the sphere without having to first go through topological spaces, etc. But, working in a formal system like Lean or Coq doesn't automatically give you a synthetic version of your field. Indeed, despite Lean's foundations being based on dependent type theory, just like homotopy theory, the proofs of Lean's homotopy theoretic results follow similar proofs to those found in the informal literature.
You can, however, prove Bolzano–Weierstrass, and most all other theorems of mathematics, in ZFC (which is also a first-order theory) because ZFC is a more powerful and expressive theory, but without the nice properties of say the theory of real-closed fields. Working in Lean (which is not a first-order logic) is more like working in ZFC. It isn't used for its nice metatheory properties but for its expressiveness and practicality. We don't make a distinction between the Lean or Coq statements that concern, say, groups and those whichthat concern topological spaces. Indeed, it is important that we can talk about both in the same theorem so that we can talk about topological groups for example. Similarly, if you developed gauge symmetry in Lean or Coq, you would have access to all of Lean's or Coq's theorems and definitions for other related fields of mathematics.