Documentation

LeanPool.Lentil.ProofMode.Tactics.Specialize

theorem TLA.ProofMode.Entails_add_new {σ : Type u} {hyps : List (NamedPred σ)} {goal : pred σ} (subHyps : List (pred σ)) (hinc : subHyps List.map NamedPred.pred hyps) (newHypName : String) (newHyp : pred σ) :
((repeatedAnd subHyps)) |-tla- (newHyp)Entails (hyps ++ [{ name := newHypName, pred := newHyp }]) goalEntails hyps goal

The general thing used in apply, have and suffices.

def TLA.ProofMode.replaceChosenPred {σ : Type u} (hyps : List (NamedPred σ)) (chosen : String) (newHyp : pred σ) :

Replace the chosen hypothesis predicate with a new one.

Equations
Instances For
    theorem TLA.ProofMode.Entails_specialize_forall_by_name {σ : Type u} {hyps : List (NamedPred σ)} {goal : pred σ} {α : Sort v} {p : αpred σ} (witness : α) (chosen : String) (hpred : List.find? (fun (h : NamedPred σ) => h.name == chosen) hyps = some { name := chosen, pred := [tlafml|∀ x, (p x)] }) :
    Entails (replaceChosenPred hyps chosen (p witness)) goalEntails hyps goal
    theorem TLA.ProofMode.Entails_specialize_forall_by_idx {σ : Type u} {hyps : List (NamedPred σ)} {goal : pred σ} {α : Sort v} {p : αpred σ} (witness : α) (idx : Nat) (hpred : Option.map NamedPred.pred hyps[idx]? = some [tlafml|∀ x, (p x)]) :
    Entails (hyps.modify idx fun (x : NamedPred σ) => match x with | { name := name, pred := pred } => { name := name, pred := p witness }) goalEntails hyps goal
    theorem TLA.ProofMode.Entails_specialize_pure_by_name {σ : Type u} {hyps : List (NamedPred σ)} {goal rhs : pred σ} {q : Prop} (hq : q) (chosen : String) (hpred : List.find? (fun (h : NamedPred σ) => h.name == chosen) hyps = some { name := chosen, pred := [tlafml|qrhs] }) :
    Entails (replaceChosenPred hyps chosen rhs) goalEntails hyps goal
    theorem TLA.ProofMode.Entails_specialize_pure_by_idx {σ : Type u} {hyps : List (NamedPred σ)} {goal rhs : pred σ} {q : Prop} (hq : q) (idx : Nat) (hpred : Option.map NamedPred.pred hyps[idx]? = some [tlafml|qrhs]) :
    Entails (hyps.modify idx fun (x : NamedPred σ) => match x with | { name := name, pred := pred } => { name := name, pred := rhs }) goalEntails hyps goal
    theorem TLA.ProofMode.Entails_specialize_valid_by_name {σ : Type u} {hyps : List (NamedPred σ)} {goal lhs rhs : pred σ} (hlhs : |-tla- (lhs)) (chosen : String) (hpred : List.find? (fun (h : NamedPred σ) => h.name == chosen) hyps = some { name := chosen, pred := [tlafml|lhsrhs] }) :
    Entails (replaceChosenPred hyps chosen rhs) goalEntails hyps goal
    theorem TLA.ProofMode.Entails_specialize_valid_by_idx {σ : Type u} {hyps : List (NamedPred σ)} {goal lhs rhs : pred σ} (hlhs : |-tla- (lhs)) (idx : Nat) (hpred : Option.map NamedPred.pred hyps[idx]? = some [tlafml|lhsrhs]) :
    Entails (hyps.modify idx fun (x : NamedPred σ) => match x with | { name := name, pred := pred } => { name := name, pred := rhs }) goalEntails hyps goal
    theorem TLA.ProofMode.Entails_specialize_temporal_by_name {σ : Type u} {hyps : List (NamedPred σ)} {goal rhs : pred σ} {lhss : List (pred σ)} (premises : List String) (hprem : List.filterMap (fun (premise : String) => Option.map NamedPred.pred (List.find? (fun (h : NamedPred σ) => h.name == premise) hyps)) premises = lhss) (chosen : String) (hpred : List.find? (fun (h : NamedPred σ) => h.name == chosen) hyps = some { name := chosen, pred := [tlafml|(repeatedAnd lhss)rhs] }) :
    Entails (replaceChosenPred hyps chosen rhs) goalEntails hyps goal
    theorem TLA.ProofMode.Entails_specialize_temporal_by_idx {σ : Type u} {hyps : List (NamedPred σ)} {goal rhs : pred σ} {lhss : List (pred σ)} (premises : List String) (hprem : List.filterMap (fun (premise : String) => Option.map NamedPred.pred (List.find? (fun (h : NamedPred σ) => h.name == premise) hyps)) premises = lhss) (idx : Nat) (hpred : Option.map NamedPred.pred hyps[idx]? = some [tlafml|(repeatedAnd lhss)rhs]) :
    Entails (hyps.modify idx fun (x : NamedPred σ) => match x with | { name := name, pred := pred } => { name := name, pred := rhs }) goalEntails hyps goal

    Specialize one temporal hypothesis once, then simplify the reflected hypothesis list back to the literal proof-mode context. Callers build repeated specialization by invoking this after each argument, so each step sees the predicate produced by the previous step.

    Instances For

      Error message for a specialize target of an unsupported shape.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For

        tla_specialize h arg₁ arg₂ ... specializes a proof-mode temporal hypothesis in place.

        If h : ∀ n, P n, then

        tla_specialize h 0
        

        changes h to P 0. If h : p → q and hp : p is a temporal hypothesis, then

        tla_specialize h hp
        

        changes h to q and keeps hp in the context. Numeric hypothesis indices may be used in place of names.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For