lean4-htt/tests/lean/run/auxinvariable.lean
Joachim Breitner 754bab442a
feat: omega to abstract its own proofs (#5998)
This PR lets `omega` always abstract its own proofs into an auxiliary
definition. The size of the olean of Vector.Extract goes down from 20MB
to 5MB with this, overall stdlib olean size and build instruction count
go down 5%.

Needs #7362.
2025-03-10 12:39:30 +00:00

18 lines
514 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.omega_1 a) : Type -/
#guard_msgs in
#check Foo 3
variable (x : Foo 2)
/-- info: x : Foo 2 (Decidable.byContradiction fun a => aux_2 a) -/
#guard_msgs in
#check x