lean4-htt/tests/lean/run/proofAsSorry.lean
Leonardo de Moura b9bf94313a
feat: add debug.proofAsSorry (#6300)
This PR adds the `debug.proofAsSorry` option. When enabled, the proofs
of theorems are ignored and replaced with `sorry`.
2024-12-03 23:21:38 +00:00

46 lines
860 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

set_option debug.proofAsSorry true
/--
error: type mismatch
rfl
has type
?m.156 = ?m.156 : Prop
but is expected to have type
2 + 2 = 5 : Prop
-/
#guard_msgs in
example : 2 + 2 = 5 := rfl -- This is not a theorem
/-- warning: declaration uses 'sorry' -/
#guard_msgs in
theorem ex : 2 + 2 = 5 := rfl
#guard_msgs in
def data (w : Nat) : String := toString w
/-- info: "37" -/
#guard_msgs in
#eval data 37
/-- warning: declaration uses 'sorry' -/
#guard_msgs in
theorem tst1 : 0 + x = 1*x + 0 := by
simp
/-- warning: declaration uses 'sorry' -/
#guard_msgs in
theorem tst2 : ∀ x, 0 + x = 1*x + 0 := by
intro x
simp
/-- warning: declaration uses 'sorry' -/
#guard_msgs in
theorem tst3 : x = 2*x + 1 := by
rfl
#guard_msgs in
def concatSelf (as : List α) := as ++ as
/-- info: [1, 2, 3, 1, 2, 3] -/
#guard_msgs in
#eval concatSelf [1, 2, 3]