@Kha We will probably have to refine the heuristic for hiding the inaccessible names, but the first version is already useful. Here is the error message for a `_` before this commit ``` error: don't know how to synthesize placeholder context: x✝⁴ : List Nat x✝³ : Nat x✝² : x✝⁴ ≠ [] a b x✝¹ : Nat x✝ : [a, b] ≠ [] ⊢ Nat ``` After ``` error: don't know how to synthesize placeholder a b : Nat : [a, b] ≠ [] ⊢ Nat ```
27 lines
618 B
Text
27 lines
618 B
Text
def f : (xs : List Nat) → Nat → xs ≠ [] → Nat
|
||
| [], _, _ => _
|
||
| [a,b], _, _ => _
|
||
| _, _, _ => _
|
||
|
||
set_option pp.inaccessibleNames true in
|
||
def f : (xs : List Nat) → Nat → xs ≠ [] → Nat
|
||
| [], _, _ => _
|
||
| [a,b], _, _ => _
|
||
| _, _, _ => _
|
||
|
||
theorem ex1 : p ∨ q → q ∨ p := by
|
||
intro h
|
||
cases h
|
||
traceState
|
||
apply Or.inr
|
||
assumption
|
||
apply Or.inl
|
||
assumption
|
||
done
|
||
|
||
theorem ex2 : {p : Prop} → [Decidable p] → p → decide p = true
|
||
| _, isTrue _, _ => _
|
||
| _, isFalse h₁, h₂ => absurd h₂ h₁
|
||
|
||
theorem ex3 : ∀ {c d : Char}, c = d → c.val = d.val
|
||
| _, _, rfl => _
|