lean4-htt/tests/lean/run/auxinvariable.lean
Sebastian Ullrich 4d58a3d124
feat: revamp aux decl name generation (#8363)
This PR unifies various ways of naming auxiliary declarations in a
conflict-free way and ensures the method is compatible with diverging
branches of elaboration such as parallelism or Aesop-like
backtracking+replaying search.
2025-05-16 14:57:18 +00:00

18 lines
518 B
Text

/-!
It used to be that aux theorems could only be created within declarations. But with `omega` wanting
to create an aux theorem, and `omega` being used in, say, `variable` commands, this is not tenable.
-/
structure Foo (n : Nat) (h : n > 1 := by omega) : Type
set_option pp.proofs true
/-- info: Foo 3 (Decidable.byContradiction fun a => _check._proof_1 a) : Type -/
#guard_msgs in
#check Foo 3
variable (x : Foo 2)
/-- info: x : Foo 2 (Decidable.byContradiction fun a => _proof_6 a) -/
#guard_msgs in
#check x