lean4-htt/tests/lean/run/345.lean
Joachim Breitner 378b02921d
refactor: port recOn construction to Lean (#4516)
this is the simplest of the constructions to be ported from C++ to Lean,
so I’ll PR this one first.

This begins to put each construction into its own file, as it was the
case with C++.

For validation I developed this in a separate repository at
https://github.com/nomeata/lean-constructions/tree/fad715e
and checked that all `.recOn` declarations found in Lean and Mathlib are
identical (per `==`) to the ones produced by the C code.
2024-06-23 07:36:27 +00:00

35 lines
978 B
Text

set_option pp.mvars false
/--
error: failed to synthesize
OfNat (Sort _) 1
numerals are polymorphic in Lean, but the numeral `1` cannot be used in a context where the expected type is
Sort _
due to the absence of the instance above
use `set_option diagnostics true` to get diagnostic information
-/
#guard_msgs in
axiom bla : 1
/--
error: failed to synthesize
OfNat (Sort _) 1
numerals are polymorphic in Lean, but the numeral `1` cannot be used in a context where the expected type is
Sort _
due to the absence of the instance above
use `set_option diagnostics true` to get diagnostic information
-/
#guard_msgs in
structure Foo where
foo : 1
/--
error: failed to synthesize
OfNat (Sort _) 1
numerals are polymorphic in Lean, but the numeral `1` cannot be used in a context where the expected type is
Sort _
due to the absence of the instance above
use `set_option diagnostics true` to get diagnostic information
-/
#guard_msgs in
inductive Bla (x : 1) : Type