Further simplified proofs in NS_public
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import Init.Data.Nat.Lemmas
|
||||
import Init.Prelude
|
||||
import Lean
|
||||
import Mathlib.Data.Nat.Basic
|
||||
import Mathlib.Data.Nat.Dist
|
||||
import Mathlib.Data.Set.Basic
|
||||
@@ -12,6 +13,8 @@ import Mathlib.Order.Lattice
|
||||
import Mathlib.Tactic.ApplyAt
|
||||
import Mathlib.Tactic.SimpIntro
|
||||
import Mathlib.Tactic.NthRewrite
|
||||
open Lean Elab Command Term Meta
|
||||
open Parser.Tactic
|
||||
|
||||
-- Keys are integers
|
||||
abbrev Key := Nat
|
||||
@@ -351,6 +354,14 @@ lemma parts_element:
|
||||
· intro h; apply_rules [ parts_subset_iff.mp, Set.singleton_subset_iff.mpr ]
|
||||
· intro h; aapply parts_subset_iff.mpr; simp
|
||||
|
||||
/--
|
||||
A tactic that expands terms like `X ∈ parts H`
|
||||
-/
|
||||
syntax (name := expandPartsElement) "expand_parts_element" (ppSpace location) : tactic
|
||||
macro_rules
|
||||
| `(tactic| expand_parts_element at $loc) =>
|
||||
`(tactic| rw[parts_element, Set.subset_def] at $loc; simp at $loc)
|
||||
|
||||
@[simp]
|
||||
lemma parts_insert_Agent {H : Set Msg} {agt : Agent} :
|
||||
parts (insert (Agent agt) H) = insert (Agent agt) (parts H) :=
|
||||
|
||||
Reference in New Issue
Block a user