lean4-htt/tests/lean/PPRoundtrip.lean.expected.out
Leonardo de Moura 10a56bf4a1 fix: fixes #1571
The previous implementation was using the following heuristic
```lean
      -- heuristic: use non-dependent arrows only if possible for whole group to avoid
      -- noisy mix like `(α : Type) → Type → (γ : Type) → ...`.
      let dependent := curNames.any fun n => hasIdent n.getId stxBody
```
The result produced by this heuristic was **not** producing an
accidental name capture, but I agree
it was confusing to have `∀ (a : True), ∃ a, a = a : Prop` instead of
`True → ∃ a, a = a : Prop` since there is no dependency.
AFAICT, all examples affected by this commit have a better output now.

cc @digma0 @kha
2022-09-15 11:16:16 -07:00

67 lines
864 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.

Prop
Type
Type
Type 1
@max Nat
@HEq Nat 1
@List.nil
Nat
List Nat
id Nat
id (id (id Nat))
List Nat
@id Type Nat
List.{0} Nat
id.{2} Nat
Sum.{0, 0} Nat Nat
id (@id Type Nat)
fun a => a
fun a => a
fun a b => a
fun a b => a
fun {a b} => a
typeAs
({α : Type} →
αα)
fun {α} a => a
fun {α}
[inst :
ToString α]
a =>
@toString α inst a
(α : Type) → α
(α : Type) →
Type → α
Type → Type → Type
(α : Type) → αα
{α : Type} → α
{α : Type} →
[inst :
ToString α] →
α
∀ (x : Nat), x = x
∀ {x : Nat}
[inst :
ToString Nat],
x = x
∀ x, x = x
0
1
42
"hi"
(1, 2, 3)
(1, 2).fst
decide (1 < 2) ||
true
id (fun a => a) 0
typeAs (Id Nat)
(let x := 1;
do
discard (pure 2)
let y : Nat := 3
pure (x + y))
typeAs (Id Nat)
(pure 1 >>= pure)
(0 ≤ 1) = False
(0 = 1) = False
- -0