Documentation

Init.Grind.Util

def Lean.Grind.nestedProof (p : Prop) {h : p} :
p

A helper gadget for annotating nested proofs in goals.

Equations
  • = h
def Lean.Grind.simpMatchDiscrsOnly {α : Sort u} (a : α) :
α

Gadget for marking match-expressions that should not be reduced by the grind simplifier, but the discriminants should be normalized. We use it when adding instances of match-equations to prevent them from being simplified to true.

Remark: it must not be marked as [reducible]. Otherwise, simp will reduce

simpMatchDiscrsOnly (match 0 with | 0 => true | _ => false) = true

using eq_self.

Equations

Gadget for representing offsets t+k in patterns.

Equations
def Lean.Grind.eqBwdPattern {α : Sort u_1} (a b : α) :

Gadget for representing a = b in patterns for backward propagation.

Equations
@[reducible, inline]
abbrev Lean.Grind.EqMatch {α : Sort u_1} (a b : α) {_origin : α} :

Gadget for annotating the equalities in match-equations conclusions. _origin is the term used to instantiate the match-equation using E-matching. When EqMatch a b origin is True, we mark origin as a resolved case-split.

Equations
  • (a = b) = (a = b)
@[reducible, inline]

Gadget for annotating conditions of match equational lemmas. We use this annotation for two different reasons:

  • We don't want to normalize them.
  • We have a propagator for them.
Equations
  • p = p

Similar to MatchCond, but not reducible. We use it to ensure simp will not eliminate it. After we apply simp, we replace it with MatchCond.

Equations
theorem Lean.Grind.nestedProof_congr (p q : Prop) (h : p = q) (hp : p) (hq : q) :
HEq
Equations
  • One or more equations did not get rendered due to their size.
Equations
  • One or more equations did not get rendered due to their size.
Equations
  • One or more equations did not get rendered due to their size.
Equations
  • One or more equations did not get rendered due to their size.