lean4-htt/tests/lean/precissues.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

30 lines
565 B
Text

id fun x => x : ?m → ?m
0 : Nat
f 1 fun x => x : Nat
0 : Nat
f 1 fun x => x : Nat
id : ?m → ?m
precissues.lean:15:10: error: expected command
id : ?m → ?m
precissues.lean:17:10: error: expected command
1 : Nat
id
(let_fun this := True.intro;
this) : True
0 =
let_fun this := 1;
this : Prop
0 =
let x := 0;
x : Prop
p ↔ ¬q : Prop
True = ¬False : Prop
p ∧ ¬q : Prop
¬p ∧ q : Prop
¬p ↔ q : Prop
¬p = q : Prop
¬p = q : Prop
id ¬p : Prop
Nat → ∀ (a : Nat), a = a : Prop
id : ?m → ?m
precissues.lean:41:10: error: expected command