Replaced some cases instances with grind
Lean Action CI / build (push) Has been cancelled

This commit is contained in:
Your Name
2026-03-05 10:02:06 +01:00
parent 80db88efbe
commit c705c80f23
5 changed files with 116 additions and 177 deletions
+7 -1
View File
@@ -33,6 +33,11 @@ noncomputable abbrev priSK (A : Agent) : Key := privateKey KeyMode.Signature A
noncomputable abbrev pubK (A : Agent) : Key := pubEK A
noncomputable abbrev priK (A : Agent) : Key := invKey (pubEK A)
attribute [simp] pubEK
attribute [simp] pubSK
-- attribute [simp] priEK
-- attribute [simp] priSK
-- Axioms for private and public keys
@[simp]
axiom privateKey_neq_publicKey {b c : KeyMode} {A A' : Agent} :
@@ -320,7 +325,7 @@ lemma priK_in_initState {b : KeyMode} {A : Agent} :
Msg.Key (privateKey b A) initState A := by
induction A <;>
simp [HasInitState.initState, initState, privateKey, pubEK, pubSK] <;>
cases b <;> simp[Spy_in_bad]
cases b <;> simp
@[simp]
lemma publicKey_in_initState {b : KeyMode} {A : Agent} {B : Agent} :
@@ -344,6 +349,7 @@ lemma analz_spies_pubK : Msg.Key (publicKey b A) ∈ analz (spies evs) := by
exact analz.inj spies_pubK
-- Spy sees private keys of bad agents
@[grind .]
lemma Spy_spies_bad_privateKey { h : A bad } : Msg.Key (privateKey b A) spies evs := by
induction evs with
| nil => simp_all [spies, knows, pubSK, pubEK]; cases b <;> tauto