def
TLA.ProofMode.replaceChosenPred
{σ : Type u}
(hyps : List (NamedPred σ))
(chosen : String)
(newHyp : pred σ)
:
Replace the chosen hypothesis predicate with a new one.
Equations
- TLA.ProofMode.replaceChosenPred hyps chosen newHyp = TLA.ProofMode.modifyHypByName hyps chosen fun (h : TLA.ProofMode.NamedPred σ) => { name := h.name, pred := newHyp }
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)) goal → Entails 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)])
:
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|⌞ q ⌟ → rhs] })
:
Entails (replaceChosenPred hyps chosen rhs) goal → Entails 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|⌞ q ⌟ → rhs])
:
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|lhs → rhs] })
:
Entails (replaceChosenPred hyps chosen rhs) goal → Entails 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) goal → Entails 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])
:
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.