Engine

7.10. Statements of Deploying🔗

The exact statements behind the claims on the page Deploying.

theorem a_rule_is_active_from_its_first_to_its_last_position (d : Deployed) (p : Nat) : d.activeAt p = true ↔ d.fromPos ≤ p ∧ ∀ q, d.toPos = some q → p ≤ q

proof: spec/Spec/Meaning.lean:484

theorem deploy_starts_new_rule_at_next_position {st st' : State} {sc : Schema} {fs : List RuleFile} (h : st.deploy sc fs = some st') {ent : String} {r : Rule} (hin : (ent, r) ∈ ruleList fs) (hnew : ∀ d ∈ st.rules, d.toPos = none → (d.entity, d.rule) ≠ (ent, r)) : { entity := ent, rule := r, fromPos := st.store.length + 1 } ∈ st'.rules

proof: spec/Spec/Facts.lean:229

theorem deploy_keeps_lifetime_of_unchanged_rule {st st' : State} {sc : Schema} {fs : List RuleFile} (h : st.deploy sc fs = some st') {d : Deployed} (hd : d ∈ st.rules) (hn : d.toPos = none) (hin : (d.entity, d.rule) ∈ ruleList fs) : ∃ d' ∈ st.rules, d' ∈ st'.rules ∧ d'.toPos = none ∧ d'.entity = d.entity ∧ d'.rule = d.rule

proof: spec/Spec/Facts.lean:248

theorem deploy_retires_removed_rule {st st' : State} {sc : Schema} {fs : List RuleFile} (h : st.deploy sc fs = some st') {d : Deployed} (hd : d ∈ st.rules) (hn : d.toPos = none) (hout : (d.entity, d.rule) ∉ ruleList fs) : { d with toPos := some st.store.length } ∈ st'.rules

proof: spec/Spec/Facts.lean:212

theorem deploy_requires_well_typed_rules {st st' : State} {sc : Schema} {fs : List RuleFile} (h : st.deploy sc fs = some st') : ∀ f ∈ fs, wellTyped sc f = true

proof: spec/Spec/Facts.lean:110

theorem deployed_invariants_hold_on_store {st st' : State} (hr : Reachable st) {sc : Schema} {fs : List RuleFile} (h : st.deploy sc fs = some st') {ent : String} {i : Inv} (hi : (ent, Rule.inv i) ∈ ruleList fs) : invHolds st.store ent i = true

proof: spec/Spec/Facts.lean:116

theorem checked_value_has_checked_type : ∀ (v : ValueExpr) {tc : TCtx} {ctx : Ctx} {t : Ty}, checkValueExpr tc v = .ok t → Fits tc ctx → (evalValueExpr ctx v).HasTy t ∧ ValueExprOk ctx v

proof: spec/Spec/TypeSafety.lean:399

theorem checked_rule_compares_one_kind {sc : Schema} {ent : String} {r : Rule} {u : Unit} (h : checkRule sc ent r = .ok u) {s : List Event} (hs : StoreValid sc s) {e : Event} (he : e.valid sc = true) : r.CmpsOk s e ent

proof: spec/Spec/TypeSafety.lean:587

theorem active_rules_compare_one_kind {st : State} (hr : Reachable st) {e : Event} (he : e.valid st.schema = true) : ∀ ent r, (ent, r) ∈ st.rulesAt (st.store.length + 1) → r.CmpsOk st.store (st.stamp e) ent

proof: spec/Spec/TypeSafety.lean:751