Step
*
1
1
1
of Lemma
bag-drop-commutes
1. T : Type
2. x : T
3. a2 : bag(T)
4. y : T
5. as@0 : bag(T)
6. eq : EqDecider(T)
7. bs : bag(T)
8. ∀x,y:T. Dec(x = y ∈ T)
9. ¬(x = y ∈ T)
10. ∀x:T. ∀bs:bag(T).
((∃as:bag(T). ((bs = ({x} + as) ∈ bag(T)) ∧ (bag-remove1(eq;bs;x) = (inl as) ∈ (bag(T)?))))
∨ ((¬x ↓∈ bs) ∧ (bag-remove1(eq;bs;x) = (inr ⋅ ) ∈ (bag(T)?))))
11. as : bag(T)
12. bs = ({x} + {y} + as@0) ∈ bag(T)
13. bag-remove1(eq;bs;x) = (inl ({y} + as@0)) ∈ (bag(T)?)
14. a1 : bag(T)
15. bs = ({y} + {x} + a2) ∈ bag(T)
16. bag-remove1(eq;bs;y) = (inl ({x} + a2)) ∈ (bag(T)?)
17. as = ({y} + as@0) ∈ bag(T)
18. bag-remove1(eq;{y} + as@0;y) = (inl as@0) ∈ (bag(T)?)
19. a1 = ({x} + a2) ∈ bag(T)
20. bag-remove1(eq;{x} + a2;x) = (inl a2) ∈ (bag(T)?)
⊢ as@0 = a2 ∈ bag(T)
BY
{ (Assert ⌜({y} + {x} + a2) = ({x} + {y} + as@0) ∈ bag(T)⌝⋅ THEN Auto) }
1
1. T : Type
2. x : T
3. a2 : bag(T)
4. y : T
5. as@0 : bag(T)
6. eq : EqDecider(T)
7. bs : bag(T)
8. ∀x,y:T. Dec(x = y ∈ T)
9. ¬(x = y ∈ T)
10. ∀x:T. ∀bs:bag(T).
((∃as:bag(T). ((bs = ({x} + as) ∈ bag(T)) ∧ (bag-remove1(eq;bs;x) = (inl as) ∈ (bag(T)?))))
∨ ((¬x ↓∈ bs) ∧ (bag-remove1(eq;bs;x) = (inr ⋅ ) ∈ (bag(T)?))))
11. as : bag(T)
12. bs = ({x} + {y} + as@0) ∈ bag(T)
13. bag-remove1(eq;bs;x) = (inl ({y} + as@0)) ∈ (bag(T)?)
14. a1 : bag(T)
15. bs = ({y} + {x} + a2) ∈ bag(T)
16. bag-remove1(eq;bs;y) = (inl ({x} + a2)) ∈ (bag(T)?)
17. as = ({y} + as@0) ∈ bag(T)
18. bag-remove1(eq;{y} + as@0;y) = (inl as@0) ∈ (bag(T)?)
19. a1 = ({x} + a2) ∈ bag(T)
20. bag-remove1(eq;{x} + a2;x) = (inl a2) ∈ (bag(T)?)
21. ({y} + {x} + a2) = ({x} + {y} + as@0) ∈ bag(T)
⊢ as@0 = a2 ∈ bag(T)
Latex:
Latex:
1. T : Type
2. x : T
3. a2 : bag(T)
4. y : T
5. as@0 : bag(T)
6. eq : EqDecider(T)
7. bs : bag(T)
8. \mforall{}x,y:T. Dec(x = y)
9. \mneg{}(x = y)
10. \mforall{}x:T. \mforall{}bs:bag(T).
((\mexists{}as:bag(T). ((bs = (\{x\} + as)) \mwedge{} (bag-remove1(eq;bs;x) = (inl as))))
\mvee{} ((\mneg{}x \mdownarrow{}\mmember{} bs) \mwedge{} (bag-remove1(eq;bs;x) = (inr \mcdot{} ))))
11. as : bag(T)
12. bs = (\{x\} + \{y\} + as@0)
13. bag-remove1(eq;bs;x) = (inl (\{y\} + as@0))
14. a1 : bag(T)
15. bs = (\{y\} + \{x\} + a2)
16. bag-remove1(eq;bs;y) = (inl (\{x\} + a2))
17. as = (\{y\} + as@0)
18. bag-remove1(eq;\{y\} + as@0;y) = (inl as@0)
19. a1 = (\{x\} + a2)
20. bag-remove1(eq;\{x\} + a2;x) = (inl a2)
\mvdash{} as@0 = a2
By
Latex:
(Assert \mkleeneopen{}(\{y\} + \{x\} + a2) = (\{x\} + \{y\} + as@0)\mkleeneclose{}\mcdot{} THEN Auto)
Home
Index