lean4-htt/tests/lean/ppNumericTypes.lean.expected.out
Kyle Miller 1d8cf38ff9
feat: pp.numericTypes option for printing number literals with type ascriptions (#2933)
Implements the pretty printer option `pp.numericTypes` for including a
type ascription for numeric literals. For example, `(2 : Nat)`, `(-2 :
Int)`, and `(-2 / 3 : Rat)`. This is useful for debugging how arithmetic
expressions have elaborated or have been otherwise transformed. For
example, with exponentiation is is helpful knowing whether it is `x ^ (2
: Nat)` or `x ^ (2 : Real)`. This is like the Lean 3 option
`pp.numeralTypes` but it has a wider notion of a numeric literal.

Also implements the pretty printer option `pp.natLit` for including the
`nat_lit` prefix for raw natural number literals.

Closes #3021
2024-02-01 17:23:32 +11:00

16 lines
427 B
Text

22 : Nat
22 : Nat
nat_lit 22 : Nat
22 : Nat
nat_lit 22 : Nat
(22 : Rat) : Rat
(-22 : Rat) : Rat
(22 / 17 : Rat) : Rat
(-22 / 17 : Rat) : Rat
(-22 : Rat) / (-17 : Rat) : Rat
(17 : Fin (22 : Nat)) : Fin (22 : Nat)
(2 : Nat) : Nat
(2 : Nat) + (1 : Nat) = (3 : Nat) : Prop
@OfNat.ofNat.{0} Nat 2 (instOfNatNat 2) : Nat
@OfNat.ofNat.{0} Nat 2 (instOfNatNat 2) : Nat
@OfNat.ofNat.{0} Nat (nat_lit 2) (instOfNatNat (nat_lit 2)) : Nat