Dataset Viewer
file
stringlengths 21
79
| dependencies
sequencelengths 1
16
| definitions
listlengths 1
625
| theorem_idx
int64 0
574
| theorem
stringlengths 3
121
| theorem_loc
sequencelengths 2
2
| tactic_idx
int64 0
155
| tactic_len
int64 1
156
| tactic
stringlengths 3
5.76k
| state_before
stringlengths 7
13.6k
| state_after
stringlengths 7
13.6k
|
---|---|---|---|---|---|---|---|---|---|---|
Mathlib/SetTheory/ZFC/Ordinal.lean | [
[
"Mathlib.SetTheory.ZFC.Basic",
"Mathlib/SetTheory/ZFC/Basic.lean"
],
[
"Init",
".lake/packages/lean4/src/lean/Init.lean"
]
] | [
{
"code": "def IsTransitive (x : ZFSet) : Prop :=\n ∀ y ∈ x, y ⊆ x",
"end": [
41,
17
],
"full_name": "ZFSet.IsTransitive",
"kind": "commanddeclaration",
"start": [
39,
1
]
},
{
"code": "@[simp]\ntheorem empty_isTransitive : IsTransitive ∅",
"end": [
45,
85
],
"full_name": "ZFSet.empty_isTransitive",
"kind": "commanddeclaration",
"start": [
44,
1
]
},
{
"code": "theorem IsTransitive.subset_of_mem (h : x.IsTransitive) : y ∈ x → y ⊆ x",
"end": [
49,
6
],
"full_name": "ZFSet.IsTransitive.subset_of_mem",
"kind": "commanddeclaration",
"start": [
48,
1
]
},
{
"code": "theorem isTransitive_iff_mem_trans : z.IsTransitive ↔ ∀ {x y : ZFSet}, x ∈ y → y ∈ z → x ∈ z",
"end": [
53,
73
],
"full_name": "ZFSet.isTransitive_iff_mem_trans",
"kind": "commanddeclaration",
"start": [
52,
1
]
},
{
"code": "protected theorem IsTransitive.inter (hx : x.IsTransitive) (hy : y.IsTransitive) :\n (x ∩ y).IsTransitive",
"end": [
62,
53
],
"full_name": "ZFSet.IsTransitive.inter",
"kind": "commanddeclaration",
"start": [
59,
1
]
},
{
"code": "protected theorem IsTransitive.sUnion (h : x.IsTransitive) :\n (⋃₀ x : ZFSet).IsTransitive",
"end": [
68,
50
],
"full_name": "ZFSet.IsTransitive.sUnion",
"kind": "commanddeclaration",
"start": [
65,
1
]
},
{
"code": "theorem IsTransitive.sUnion' (H : ∀ y ∈ x, IsTransitive y) :\n (⋃₀ x : ZFSet).IsTransitive",
"end": [
74,
57
],
"full_name": "ZFSet.IsTransitive.sUnion'",
"kind": "commanddeclaration",
"start": [
71,
1
]
},
{
"code": "protected theorem IsTransitive.union (hx : x.IsTransitive) (hy : y.IsTransitive) :\n (x ∪ y).IsTransitive",
"end": [
84,
14
],
"full_name": "ZFSet.IsTransitive.union",
"kind": "commanddeclaration",
"start": [
77,
1
]
},
{
"code": "protected theorem IsTransitive.powerset (h : x.IsTransitive) : (powerset x).IsTransitive",
"end": [
90,
32
],
"full_name": "ZFSet.IsTransitive.powerset",
"kind": "commanddeclaration",
"start": [
87,
1
]
},
{
"code": "theorem isTransitive_iff_sUnion_subset : x.IsTransitive ↔ (⋃₀ x : ZFSet) ⊆ x",
"end": [
96,
79
],
"full_name": "ZFSet.isTransitive_iff_sUnion_subset",
"kind": "commanddeclaration",
"start": [
93,
1
]
},
{
"code": "theorem isTransitive_iff_subset_powerset : x.IsTransitive ↔ x ⊆ powerset x",
"end": [
103,
100
],
"full_name": "ZFSet.isTransitive_iff_subset_powerset",
"kind": "commanddeclaration",
"start": [
102,
1
]
}
] | 6 | ZFSet.IsTransitive.union | [
[
78,
29
],
[
84,
14
]
] | 0 | 6 | rw [← sUnion_pair] | x y z : ZFSet
hx : x.IsTransitive
hy : y.IsTransitive
⊢ (x ∪ y).IsTransitive | x y z : ZFSet
hx : x.IsTransitive
hy : y.IsTransitive
⊢ (⋃₀ {x, y}).IsTransitive |
Mathlib/SetTheory/ZFC/Ordinal.lean | [
[
"Mathlib.SetTheory.ZFC.Basic",
"Mathlib/SetTheory/ZFC/Basic.lean"
],
[
"Init",
".lake/packages/lean4/src/lean/Init.lean"
]
] | [
{
"code": "def IsTransitive (x : ZFSet) : Prop :=\n ∀ y ∈ x, y ⊆ x",
"end": [
41,
17
],
"full_name": "ZFSet.IsTransitive",
"kind": "commanddeclaration",
"start": [
39,
1
]
},
{
"code": "@[simp]\ntheorem empty_isTransitive : IsTransitive ∅",
"end": [
45,
85
],
"full_name": "ZFSet.empty_isTransitive",
"kind": "commanddeclaration",
"start": [
44,
1
]
},
{
"code": "theorem IsTransitive.subset_of_mem (h : x.IsTransitive) : y ∈ x → y ⊆ x",
"end": [
49,
6
],
"full_name": "ZFSet.IsTransitive.subset_of_mem",
"kind": "commanddeclaration",
"start": [
48,
1
]
},
{
"code": "theorem isTransitive_iff_mem_trans : z.IsTransitive ↔ ∀ {x y : ZFSet}, x ∈ y → y ∈ z → x ∈ z",
"end": [
53,
73
],
"full_name": "ZFSet.isTransitive_iff_mem_trans",
"kind": "commanddeclaration",
"start": [
52,
1
]
},
{
"code": "protected theorem IsTransitive.inter (hx : x.IsTransitive) (hy : y.IsTransitive) :\n (x ∩ y).IsTransitive",
"end": [
62,
53
],
"full_name": "ZFSet.IsTransitive.inter",
"kind": "commanddeclaration",
"start": [
59,
1
]
},
{
"code": "protected theorem IsTransitive.sUnion (h : x.IsTransitive) :\n (⋃₀ x : ZFSet).IsTransitive",
"end": [
68,
50
],
"full_name": "ZFSet.IsTransitive.sUnion",
"kind": "commanddeclaration",
"start": [
65,
1
]
},
{
"code": "theorem IsTransitive.sUnion' (H : ∀ y ∈ x, IsTransitive y) :\n (⋃₀ x : ZFSet).IsTransitive",
"end": [
74,
57
],
"full_name": "ZFSet.IsTransitive.sUnion'",
"kind": "commanddeclaration",
"start": [
71,
1
]
},
{
"code": "protected theorem IsTransitive.union (hx : x.IsTransitive) (hy : y.IsTransitive) :\n (x ∪ y).IsTransitive",
"end": [
84,
14
],
"full_name": "ZFSet.IsTransitive.union",
"kind": "commanddeclaration",
"start": [
77,
1
]
},
{
"code": "protected theorem IsTransitive.powerset (h : x.IsTransitive) : (powerset x).IsTransitive",
"end": [
90,
32
],
"full_name": "ZFSet.IsTransitive.powerset",
"kind": "commanddeclaration",
"start": [
87,
1
]
},
{
"code": "theorem isTransitive_iff_sUnion_subset : x.IsTransitive ↔ (⋃₀ x : ZFSet) ⊆ x",
"end": [
96,
79
],
"full_name": "ZFSet.isTransitive_iff_sUnion_subset",
"kind": "commanddeclaration",
"start": [
93,
1
]
},
{
"code": "theorem isTransitive_iff_subset_powerset : x.IsTransitive ↔ x ⊆ powerset x",
"end": [
103,
100
],
"full_name": "ZFSet.isTransitive_iff_subset_powerset",
"kind": "commanddeclaration",
"start": [
102,
1
]
}
] | 6 | ZFSet.IsTransitive.union | [
[
78,
29
],
[
84,
14
]
] | 1 | 6 | apply IsTransitive.sUnion' fun z => _ | x y z : ZFSet
hx : x.IsTransitive
hy : y.IsTransitive
⊢ (⋃₀ {x, y}).IsTransitive | x y z : ZFSet
hx : x.IsTransitive
hy : y.IsTransitive
⊢ ∀ z ∈ {x, y}, z.IsTransitive |
Mathlib/SetTheory/ZFC/Ordinal.lean | [
[
"Mathlib.SetTheory.ZFC.Basic",
"Mathlib/SetTheory/ZFC/Basic.lean"
],
[
"Init",
".lake/packages/lean4/src/lean/Init.lean"
]
] | [
{
"code": "def IsTransitive (x : ZFSet) : Prop :=\n ∀ y ∈ x, y ⊆ x",
"end": [
41,
17
],
"full_name": "ZFSet.IsTransitive",
"kind": "commanddeclaration",
"start": [
39,
1
]
},
{
"code": "@[simp]\ntheorem empty_isTransitive : IsTransitive ∅",
"end": [
45,
85
],
"full_name": "ZFSet.empty_isTransitive",
"kind": "commanddeclaration",
"start": [
44,
1
]
},
{
"code": "theorem IsTransitive.subset_of_mem (h : x.IsTransitive) : y ∈ x → y ⊆ x",
"end": [
49,
6
],
"full_name": "ZFSet.IsTransitive.subset_of_mem",
"kind": "commanddeclaration",
"start": [
48,
1
]
},
{
"code": "theorem isTransitive_iff_mem_trans : z.IsTransitive ↔ ∀ {x y : ZFSet}, x ∈ y → y ∈ z → x ∈ z",
"end": [
53,
73
],
"full_name": "ZFSet.isTransitive_iff_mem_trans",
"kind": "commanddeclaration",
"start": [
52,
1
]
},
{
"code": "protected theorem IsTransitive.inter (hx : x.IsTransitive) (hy : y.IsTransitive) :\n (x ∩ y).IsTransitive",
"end": [
62,
53
],
"full_name": "ZFSet.IsTransitive.inter",
"kind": "commanddeclaration",
"start": [
59,
1
]
},
{
"code": "protected theorem IsTransitive.sUnion (h : x.IsTransitive) :\n (⋃₀ x : ZFSet).IsTransitive",
"end": [
68,
50
],
"full_name": "ZFSet.IsTransitive.sUnion",
"kind": "commanddeclaration",
"start": [
65,
1
]
},
{
"code": "theorem IsTransitive.sUnion' (H : ∀ y ∈ x, IsTransitive y) :\n (⋃₀ x : ZFSet).IsTransitive",
"end": [
74,
57
],
"full_name": "ZFSet.IsTransitive.sUnion'",
"kind": "commanddeclaration",
"start": [
71,
1
]
},
{
"code": "protected theorem IsTransitive.union (hx : x.IsTransitive) (hy : y.IsTransitive) :\n (x ∪ y).IsTransitive",
"end": [
84,
14
],
"full_name": "ZFSet.IsTransitive.union",
"kind": "commanddeclaration",
"start": [
77,
1
]
},
{
"code": "protected theorem IsTransitive.powerset (h : x.IsTransitive) : (powerset x).IsTransitive",
"end": [
90,
32
],
"full_name": "ZFSet.IsTransitive.powerset",
"kind": "commanddeclaration",
"start": [
87,
1
]
},
{
"code": "theorem isTransitive_iff_sUnion_subset : x.IsTransitive ↔ (⋃₀ x : ZFSet) ⊆ x",
"end": [
96,
79
],
"full_name": "ZFSet.isTransitive_iff_sUnion_subset",
"kind": "commanddeclaration",
"start": [
93,
1
]
},
{
"code": "theorem isTransitive_iff_subset_powerset : x.IsTransitive ↔ x ⊆ powerset x",
"end": [
103,
100
],
"full_name": "ZFSet.isTransitive_iff_subset_powerset",
"kind": "commanddeclaration",
"start": [
102,
1
]
}
] | 6 | ZFSet.IsTransitive.union | [
[
78,
29
],
[
84,
14
]
] | 2 | 6 | intro | x y z : ZFSet
hx : x.IsTransitive
hy : y.IsTransitive
⊢ ∀ z ∈ {x, y}, z.IsTransitive | x y z : ZFSet
hx : x.IsTransitive
hy : y.IsTransitive
z✝ : ZFSet
⊢ z✝ ∈ {x, y} → z✝.IsTransitive |
Mathlib/SetTheory/ZFC/Ordinal.lean | [
[
"Mathlib.SetTheory.ZFC.Basic",
"Mathlib/SetTheory/ZFC/Basic.lean"
],
[
"Init",
".lake/packages/lean4/src/lean/Init.lean"
]
] | [
{
"code": "def IsTransitive (x : ZFSet) : Prop :=\n ∀ y ∈ x, y ⊆ x",
"end": [
41,
17
],
"full_name": "ZFSet.IsTransitive",
"kind": "commanddeclaration",
"start": [
39,
1
]
},
{
"code": "@[simp]\ntheorem empty_isTransitive : IsTransitive ∅",
"end": [
45,
85
],
"full_name": "ZFSet.empty_isTransitive",
"kind": "commanddeclaration",
"start": [
44,
1
]
},
{
"code": "theorem IsTransitive.subset_of_mem (h : x.IsTransitive) : y ∈ x → y ⊆ x",
"end": [
49,
6
],
"full_name": "ZFSet.IsTransitive.subset_of_mem",
"kind": "commanddeclaration",
"start": [
48,
1
]
},
{
"code": "theorem isTransitive_iff_mem_trans : z.IsTransitive ↔ ∀ {x y : ZFSet}, x ∈ y → y ∈ z → x ∈ z",
"end": [
53,
73
],
"full_name": "ZFSet.isTransitive_iff_mem_trans",
"kind": "commanddeclaration",
"start": [
52,
1
]
},
{
"code": "protected theorem IsTransitive.inter (hx : x.IsTransitive) (hy : y.IsTransitive) :\n (x ∩ y).IsTransitive",
"end": [
62,
53
],
"full_name": "ZFSet.IsTransitive.inter",
"kind": "commanddeclaration",
"start": [
59,
1
]
},
{
"code": "protected theorem IsTransitive.sUnion (h : x.IsTransitive) :\n (⋃₀ x : ZFSet).IsTransitive",
"end": [
68,
50
],
"full_name": "ZFSet.IsTransitive.sUnion",
"kind": "commanddeclaration",
"start": [
65,
1
]
},
{
"code": "theorem IsTransitive.sUnion' (H : ∀ y ∈ x, IsTransitive y) :\n (⋃₀ x : ZFSet).IsTransitive",
"end": [
74,
57
],
"full_name": "ZFSet.IsTransitive.sUnion'",
"kind": "commanddeclaration",
"start": [
71,
1
]
},
{
"code": "protected theorem IsTransitive.union (hx : x.IsTransitive) (hy : y.IsTransitive) :\n (x ∪ y).IsTransitive",
"end": [
84,
14
],
"full_name": "ZFSet.IsTransitive.union",
"kind": "commanddeclaration",
"start": [
77,
1
]
},
{
"code": "protected theorem IsTransitive.powerset (h : x.IsTransitive) : (powerset x).IsTransitive",
"end": [
90,
32
],
"full_name": "ZFSet.IsTransitive.powerset",
"kind": "commanddeclaration",
"start": [
87,
1
]
},
{
"code": "theorem isTransitive_iff_sUnion_subset : x.IsTransitive ↔ (⋃₀ x : ZFSet) ⊆ x",
"end": [
96,
79
],
"full_name": "ZFSet.isTransitive_iff_sUnion_subset",
"kind": "commanddeclaration",
"start": [
93,
1
]
},
{
"code": "theorem isTransitive_iff_subset_powerset : x.IsTransitive ↔ x ⊆ powerset x",
"end": [
103,
100
],
"full_name": "ZFSet.isTransitive_iff_subset_powerset",
"kind": "commanddeclaration",
"start": [
102,
1
]
}
] | 6 | ZFSet.IsTransitive.union | [
[
78,
29
],
[
84,
14
]
] | 3 | 6 | rw [mem_pair] | x y z : ZFSet
hx : x.IsTransitive
hy : y.IsTransitive
z✝ : ZFSet
⊢ z✝ ∈ {x, y} → z✝.IsTransitive | x y z : ZFSet
hx : x.IsTransitive
hy : y.IsTransitive
z✝ : ZFSet
⊢ z✝ = x ∨ z✝ = y → z✝.IsTransitive |
Mathlib/SetTheory/ZFC/Ordinal.lean | [
[
"Mathlib.SetTheory.ZFC.Basic",
"Mathlib/SetTheory/ZFC/Basic.lean"
],
[
"Init",
".lake/packages/lean4/src/lean/Init.lean"
]
] | [
{
"code": "def IsTransitive (x : ZFSet) : Prop :=\n ∀ y ∈ x, y ⊆ x",
"end": [
41,
17
],
"full_name": "ZFSet.IsTransitive",
"kind": "commanddeclaration",
"start": [
39,
1
]
},
{
"code": "@[simp]\ntheorem empty_isTransitive : IsTransitive ∅",
"end": [
45,
85
],
"full_name": "ZFSet.empty_isTransitive",
"kind": "commanddeclaration",
"start": [
44,
1
]
},
{
"code": "theorem IsTransitive.subset_of_mem (h : x.IsTransitive) : y ∈ x → y ⊆ x",
"end": [
49,
6
],
"full_name": "ZFSet.IsTransitive.subset_of_mem",
"kind": "commanddeclaration",
"start": [
48,
1
]
},
{
"code": "theorem isTransitive_iff_mem_trans : z.IsTransitive ↔ ∀ {x y : ZFSet}, x ∈ y → y ∈ z → x ∈ z",
"end": [
53,
73
],
"full_name": "ZFSet.isTransitive_iff_mem_trans",
"kind": "commanddeclaration",
"start": [
52,
1
]
},
{
"code": "protected theorem IsTransitive.inter (hx : x.IsTransitive) (hy : y.IsTransitive) :\n (x ∩ y).IsTransitive",
"end": [
62,
53
],
"full_name": "ZFSet.IsTransitive.inter",
"kind": "commanddeclaration",
"start": [
59,
1
]
},
{
"code": "protected theorem IsTransitive.sUnion (h : x.IsTransitive) :\n (⋃₀ x : ZFSet).IsTransitive",
"end": [
68,
50
],
"full_name": "ZFSet.IsTransitive.sUnion",
"kind": "commanddeclaration",
"start": [
65,
1
]
},
{
"code": "theorem IsTransitive.sUnion' (H : ∀ y ∈ x, IsTransitive y) :\n (⋃₀ x : ZFSet).IsTransitive",
"end": [
74,
57
],
"full_name": "ZFSet.IsTransitive.sUnion'",
"kind": "commanddeclaration",
"start": [
71,
1
]
},
{
"code": "protected theorem IsTransitive.union (hx : x.IsTransitive) (hy : y.IsTransitive) :\n (x ∪ y).IsTransitive",
"end": [
84,
14
],
"full_name": "ZFSet.IsTransitive.union",
"kind": "commanddeclaration",
"start": [
77,
1
]
},
{
"code": "protected theorem IsTransitive.powerset (h : x.IsTransitive) : (powerset x).IsTransitive",
"end": [
90,
32
],
"full_name": "ZFSet.IsTransitive.powerset",
"kind": "commanddeclaration",
"start": [
87,
1
]
},
{
"code": "theorem isTransitive_iff_sUnion_subset : x.IsTransitive ↔ (⋃₀ x : ZFSet) ⊆ x",
"end": [
96,
79
],
"full_name": "ZFSet.isTransitive_iff_sUnion_subset",
"kind": "commanddeclaration",
"start": [
93,
1
]
},
{
"code": "theorem isTransitive_iff_subset_powerset : x.IsTransitive ↔ x ⊆ powerset x",
"end": [
103,
100
],
"full_name": "ZFSet.isTransitive_iff_subset_powerset",
"kind": "commanddeclaration",
"start": [
102,
1
]
}
] | 6 | ZFSet.IsTransitive.union | [
[
78,
29
],
[
84,
14
]
] | 4 | 6 | rintro (rfl | rfl) | x y z : ZFSet
hx : x.IsTransitive
hy : y.IsTransitive
z✝ : ZFSet
⊢ z✝ = x ∨ z✝ = y → z✝.IsTransitive | case inl
y z : ZFSet
hy : y.IsTransitive
z✝ : ZFSet
hx : z✝.IsTransitive
⊢ z✝.IsTransitive
case inr
x z : ZFSet
hx : x.IsTransitive
z✝ : ZFSet
hy : z✝.IsTransitive
⊢ z✝.IsTransitive |
Mathlib/SetTheory/ZFC/Ordinal.lean | [
[
"Mathlib.SetTheory.ZFC.Basic",
"Mathlib/SetTheory/ZFC/Basic.lean"
],
[
"Init",
".lake/packages/lean4/src/lean/Init.lean"
]
] | [
{
"code": "def IsTransitive (x : ZFSet) : Prop :=\n ∀ y ∈ x, y ⊆ x",
"end": [
41,
17
],
"full_name": "ZFSet.IsTransitive",
"kind": "commanddeclaration",
"start": [
39,
1
]
},
{
"code": "@[simp]\ntheorem empty_isTransitive : IsTransitive ∅",
"end": [
45,
85
],
"full_name": "ZFSet.empty_isTransitive",
"kind": "commanddeclaration",
"start": [
44,
1
]
},
{
"code": "theorem IsTransitive.subset_of_mem (h : x.IsTransitive) : y ∈ x → y ⊆ x",
"end": [
49,
6
],
"full_name": "ZFSet.IsTransitive.subset_of_mem",
"kind": "commanddeclaration",
"start": [
48,
1
]
},
{
"code": "theorem isTransitive_iff_mem_trans : z.IsTransitive ↔ ∀ {x y : ZFSet}, x ∈ y → y ∈ z → x ∈ z",
"end": [
53,
73
],
"full_name": "ZFSet.isTransitive_iff_mem_trans",
"kind": "commanddeclaration",
"start": [
52,
1
]
},
{
"code": "protected theorem IsTransitive.inter (hx : x.IsTransitive) (hy : y.IsTransitive) :\n (x ∩ y).IsTransitive",
"end": [
62,
53
],
"full_name": "ZFSet.IsTransitive.inter",
"kind": "commanddeclaration",
"start": [
59,
1
]
},
{
"code": "protected theorem IsTransitive.sUnion (h : x.IsTransitive) :\n (⋃₀ x : ZFSet).IsTransitive",
"end": [
68,
50
],
"full_name": "ZFSet.IsTransitive.sUnion",
"kind": "commanddeclaration",
"start": [
65,
1
]
},
{
"code": "theorem IsTransitive.sUnion' (H : ∀ y ∈ x, IsTransitive y) :\n (⋃₀ x : ZFSet).IsTransitive",
"end": [
74,
57
],
"full_name": "ZFSet.IsTransitive.sUnion'",
"kind": "commanddeclaration",
"start": [
71,
1
]
},
{
"code": "protected theorem IsTransitive.union (hx : x.IsTransitive) (hy : y.IsTransitive) :\n (x ∪ y).IsTransitive",
"end": [
84,
14
],
"full_name": "ZFSet.IsTransitive.union",
"kind": "commanddeclaration",
"start": [
77,
1
]
},
{
"code": "protected theorem IsTransitive.powerset (h : x.IsTransitive) : (powerset x).IsTransitive",
"end": [
90,
32
],
"full_name": "ZFSet.IsTransitive.powerset",
"kind": "commanddeclaration",
"start": [
87,
1
]
},
{
"code": "theorem isTransitive_iff_sUnion_subset : x.IsTransitive ↔ (⋃₀ x : ZFSet) ⊆ x",
"end": [
96,
79
],
"full_name": "ZFSet.isTransitive_iff_sUnion_subset",
"kind": "commanddeclaration",
"start": [
93,
1
]
},
{
"code": "theorem isTransitive_iff_subset_powerset : x.IsTransitive ↔ x ⊆ powerset x",
"end": [
103,
100
],
"full_name": "ZFSet.isTransitive_iff_subset_powerset",
"kind": "commanddeclaration",
"start": [
102,
1
]
}
] | 6 | ZFSet.IsTransitive.union | [
[
78,
29
],
[
84,
14
]
] | 5 | 6 | assumption' | case inl
y z : ZFSet
hy : y.IsTransitive
z✝ : ZFSet
hx : z✝.IsTransitive
⊢ z✝.IsTransitive
case inr
x z : ZFSet
hx : x.IsTransitive
z✝ : ZFSet
hy : z✝.IsTransitive
⊢ z✝.IsTransitive | no goals |
Mathlib/SetTheory/Surreal/Multiplication.lean | [
[
"Mathlib.SetTheory.Surreal.Basic",
"Mathlib/SetTheory/Surreal/Basic.lean"
],
[
"Mathlib.Logic.Hydra",
"Mathlib/Logic/Hydra.lean"
],
[
"Init",
".lake/packages/lean4/src/lean/Init.lean"
]
] | [
{
"code": "def P1 (x₁ x₂ x₃ y₁ y₂ y₃ : PGame) :=\n ⟦x₁ * y₁⟧ + ⟦x₂ * y₂⟧ - ⟦x₁ * y₂⟧ < ⟦x₃ * y₁⟧ + ⟦x₂ * y₃⟧ - (⟦x₃ * y₃⟧ : Game)",
"end": [
74,
81
],
"full_name": "Surreal.Multiplication.P1",
"kind": "commanddeclaration",
"start": [
71,
1
]
},
{
"code": "def P2 (x₁ x₂ y : PGame) := x₁ ≈ x₂ → ⟦x₁ * y⟧ = (⟦x₂ * y⟧ : Game)",
"end": [
77,
67
],
"full_name": "Surreal.Multiplication.P2",
"kind": "commanddeclaration",
"start": [
76,
1
]
},
{
"code": "def P3 (x₁ x₂ y₁ y₂ : PGame) := ⟦x₁ * y₂⟧ + ⟦x₂ * y₁⟧ < ⟦x₁ * y₁⟧ + (⟦x₂ * y₂⟧ : Game)",
"end": [
80,
87
],
"full_name": "Surreal.Multiplication.P3",
"kind": "commanddeclaration",
"start": [
79,
1
]
},
{
"code": "def P4 (x₁ x₂ y : PGame) :=\n x₁ < x₂ → (∀ i, P3 x₁ x₂ (y.moveLeft i) y) ∧ ∀ j, P3 x₁ x₂ ((-y).moveLeft j) (-y)",
"end": [
87,
84
],
"full_name": "Surreal.Multiplication.P4",
"kind": "commanddeclaration",
"start": [
82,
1
]
},
{
"code": "def P24 (x₁ x₂ y : PGame) : Prop := P2 x₁ x₂ y ∧ P4 x₁ x₂ y",
"end": [
90,
60
],
"full_name": "Surreal.Multiplication.P24",
"kind": "commanddeclaration",
"start": [
89,
1
]
},
{
"code": "lemma P3_comm : P3 x₁ x₂ y₁ y₂ ↔ P3 y₁ y₂ x₁ x₂ := by\n rw [P3, P3, add_comm]\n congr! 2 <;> rw [quot_mul_comm]",
"end": [
98,
34
],
"full_name": "Surreal.Multiplication.P3_comm",
"kind": "lemma",
"start": [
96,
1
]
},
{
"code": "lemma P3.trans (h₁ : P3 x₁ x₂ y₁ y₂) (h₂ : P3 x₂ x₃ y₁ y₂) : P3 x₁ x₃ y₁ y₂ := by\n rw [P3] at h₁ h₂\n rw [P3, ← add_lt_add_iff_left (⟦x₂ * y₁⟧ + ⟦x₂ * y₂⟧)]\n convert add_lt_add h₁ h₂ using 1 <;> abel",
"end": [
103,
44
],
"full_name": "Surreal.Multiplication.P3.trans",
"kind": "lemma",
"start": [
100,
1
]
},
{
"code": "lemma P3_neg : P3 x₁ x₂ y₁ y₂ ↔ P3 (-x₂) (-x₁) y₁ y₂ := by\n simp_rw [P3, quot_neg_mul]\n rw [← _root_.neg_lt_neg_iff]\n abel_nf",
"end": [
108,
10
],
"full_name": "Surreal.Multiplication.P3_neg",
"kind": "lemma",
"start": [
105,
1
]
},
{
"code": "lemma P2_neg_left : P2 x₁ x₂ y ↔ P2 (-x₂) (-x₁) y := by\n rw [P2, P2]\n constructor\n · rw [quot_neg_mul, quot_neg_mul, eq_comm, neg_inj, neg_equiv_neg_iff, PGame.equiv_comm]\n exact (· ·)\n · rw [PGame.equiv_comm, neg_equiv_neg_iff, quot_neg_mul, quot_neg_mul, neg_inj, eq_comm]\n exact (· ·)",
"end": [
116,
16
],
"full_name": "Surreal.Multiplication.P2_neg_left",
"kind": "lemma",
"start": [
110,
1
]
},
{
"code": "lemma P2_neg_right : P2 x₁ x₂ y ↔ P2 x₁ x₂ (-y) := by\n rw [P2, P2, quot_mul_neg, quot_mul_neg, neg_inj]",
"end": [
119,
51
],
"full_name": "Surreal.Multiplication.P2_neg_right",
"kind": "lemma",
"start": [
118,
1
]
},
{
"code": "lemma P4_neg_left : P4 x₁ x₂ y ↔ P4 (-x₂) (-x₁) y := by\n simp_rw [P4, PGame.neg_lt_neg_iff, moveLeft_neg', ← P3_neg]",
"end": [
122,
62
],
"full_name": "Surreal.Multiplication.P4_neg_left",
"kind": "lemma",
"start": [
121,
1
]
},
{
"code": "lemma P4_neg_right : P4 x₁ x₂ y ↔ P4 x₁ x₂ (-y) := by\n rw [P4, P4, neg_neg, and_comm]",
"end": [
125,
33
],
"full_name": "Surreal.Multiplication.P4_neg_right",
"kind": "lemma",
"start": [
124,
1
]
},
{
"code": "lemma P24_neg_left : P24 x₁ x₂ y ↔ P24 (-x₂) (-x₁) y := by rw [P24, P24, P2_neg_left, P4_neg_left]",
"end": [
127,
99
],
"full_name": "Surreal.Multiplication.P24_neg_left",
"kind": "lemma",
"start": [
127,
1
]
},
{
"code": "lemma P24_neg_right : P24 x₁ x₂ y ↔ P24 x₁ x₂ (-y) := by rw [P24, P24, P2_neg_right, P4_neg_right]",
"end": [
128,
99
],
"full_name": "Surreal.Multiplication.P24_neg_right",
"kind": "lemma",
"start": [
128,
1
]
},
{
"code": "lemma mulOption_lt_iff_P1 {i j k l} :\n (⟦mulOption x y i k⟧ : Game) < -⟦mulOption x (-y) j l⟧ ↔\n P1 (x.moveLeft i) x (x.moveLeft j) y (y.moveLeft k) (-(-y).moveLeft l) := by\n dsimp only [P1, mulOption, quot_sub, quot_add]\n simp_rw [neg_sub', neg_add, quot_mul_neg, neg_neg]",
"end": [
136,
53
],
"full_name": "Surreal.Multiplication.mulOption_lt_iff_P1",
"kind": "lemma",
"start": [
132,
1
]
},
{
"code": "lemma mulOption_lt_mul_iff_P3 {i j} :\n ⟦mulOption x y i j⟧ < (⟦x * y⟧ : Game) ↔ P3 (x.moveLeft i) x (y.moveLeft j) y := by\n dsimp only [mulOption, quot_sub, quot_add]\n exact sub_lt_iff_lt_add'",
"end": [
141,
27
],
"full_name": "Surreal.Multiplication.mulOption_lt_mul_iff_P3",
"kind": "lemma",
"start": [
138,
1
]
},
{
"code": "lemma P1_of_eq (he : x₁ ≈ x₃) (h₁ : P2 x₁ x₃ y₁) (h₃ : P2 x₁ x₃ y₃) (h3 : P3 x₁ x₂ y₂ y₃) :\n P1 x₁ x₂ x₃ y₁ y₂ y₃ := by\n rw [P1, ← h₁ he, ← h₃ he, sub_lt_sub_iff]\n convert add_lt_add_left h3 ⟦x₁ * y₁⟧ using 1 <;> abel",
"end": [
146,
56
],
"full_name": "Surreal.Multiplication.P1_of_eq",
"kind": "lemma",
"start": [
143,
1
]
},
{
"code": "lemma P1_of_lt (h₁ : P3 x₃ x₂ y₂ y₃) (h₂ : P3 x₁ x₃ y₂ y₁) : P1 x₁ x₂ x₃ y₁ y₂ y₃ := by\n rw [P1, sub_lt_sub_iff, ← add_lt_add_iff_left ⟦x₃ * y₂⟧]\n convert add_lt_add h₁ h₂ using 1 <;> abel",
"end": [
150,
44
],
"full_name": "Surreal.Multiplication.P1_of_lt",
"kind": "lemma",
"start": [
148,
1
]
},
{
"code": "inductive Args : Type (u+1)\n | P1 (x y : PGame.{u}) : Args\n | P24 (x₁ x₂ y : PGame.{u}) : Args",
"end": [
155,
37
],
"full_name": "Surreal.Multiplication.Args",
"kind": "commanddeclaration",
"start": [
152,
1
]
},
{
"code": "def Args.toMultiset : Args → Multiset PGame\n | (Args.P1 x y) => {x, y}\n | (Args.P24 x₁ x₂ y) => {x₁, x₂, y}",
"end": [
160,
38
],
"full_name": "Surreal.Multiplication.Args.toMultiset",
"kind": "commanddeclaration",
"start": [
157,
1
]
},
{
"code": "def Args.Numeric (a : Args) := ∀ x ∈ a.toMultiset, SetTheory.PGame.Numeric x",
"end": [
163,
77
],
"full_name": "Surreal.Multiplication.Args.Numeric",
"kind": "commanddeclaration",
"start": [
162,
1
]
},
{
"code": "lemma Args.numeric_P1 {x y} : (Args.P1 x y).Numeric ↔ x.Numeric ∧ y.Numeric := by\n simp [Args.Numeric, Args.toMultiset]",
"end": [
166,
39
],
"full_name": "Surreal.Multiplication.Args.numeric_P1",
"kind": "lemma",
"start": [
165,
1
]
},
{
"code": "lemma Args.numeric_P24 {x₁ x₂ y} :\n (Args.P24 x₁ x₂ y).Numeric ↔ x₁.Numeric ∧ x₂.Numeric ∧ y.Numeric := by\n simp [Args.Numeric, Args.toMultiset]",
"end": [
170,
39
],
"full_name": "Surreal.Multiplication.Args.numeric_P24",
"kind": "lemma",
"start": [
168,
1
]
},
{
"code": "def ArgsRel := InvImage (TransGen <| CutExpand IsOption) Args.toMultiset",
"end": [
177,
73
],
"full_name": "Surreal.Multiplication.ArgsRel",
"kind": "commanddeclaration",
"start": [
174,
1
]
},
{
"code": "theorem argsRel_wf : WellFounded ArgsRel",
"end": [
180,
89
],
"full_name": "Surreal.Multiplication.argsRel_wf",
"kind": "commanddeclaration",
"start": [
179,
1
]
},
{
"code": "def P124 : Args → Prop\n | (Args.P1 x y) => Numeric (x * y)\n | (Args.P24 x₁ x₂ y) => P24 x₁ x₂ y",
"end": [
185,
38
],
"full_name": "Surreal.Multiplication.P124",
"kind": "commanddeclaration",
"start": [
182,
1
]
},
{
"code": "lemma ArgsRel.numeric_closed {a' a} : ArgsRel a' a → a.Numeric → a'.Numeric :=\n TransGen.closed' <| @cutExpand_closed _ IsOption ⟨wf_isOption.isIrrefl.1⟩ _ Numeric.isOption",
"end": [
189,
95
],
"full_name": "Surreal.Multiplication.ArgsRel.numeric_closed",
"kind": "lemma",
"start": [
187,
1
]
},
{
"code": "def IH1 (x y : PGame) : Prop :=\n ∀ ⦃x₁ x₂ y'⦄, IsOption x₁ x → IsOption x₂ x → (y' = y ∨ IsOption y' y) → P24 x₁ x₂ y'",
"end": [
193,
88
],
"full_name": "Surreal.Multiplication.IH1",
"kind": "commanddeclaration",
"start": [
191,
1
]
},
{
"code": "lemma ih1_neg_left : IH1 x y → IH1 (-x) y :=\n fun h x₁ x₂ y' h₁ h₂ hy ↦ by\n rw [isOption_neg] at h₁ h₂\n exact P24_neg_left.2 (h h₂ h₁ hy)",
"end": [
200,
38
],
"full_name": "Surreal.Multiplication.ih1_neg_left",
"kind": "lemma",
"start": [
197,
1
]
},
{
"code": "lemma ih1_neg_right : IH1 x y → IH1 x (-y) :=\n fun h x₁ x₂ y' ↦ by\n rw [← neg_eq_iff_eq_neg, isOption_neg, P24_neg_right]\n apply h",
"end": [
205,
12
],
"full_name": "Surreal.Multiplication.ih1_neg_right",
"kind": "lemma",
"start": [
202,
1
]
},
{
"code": "lemma numeric_option_mul (h : IsOption x' x) : (x' * y).Numeric :=\n ih (Args.P1 x' y) (TransGen.single <| cutExpand_pair_left h)",
"end": [
212,
63
],
"full_name": "Surreal.Multiplication.numeric_option_mul",
"kind": "lemma",
"start": [
211,
1
]
},
{
"code": "lemma numeric_mul_option (h : IsOption y' y) : (x * y').Numeric :=\n ih (Args.P1 x y') (TransGen.single <| cutExpand_pair_right h)",
"end": [
215,
64
],
"full_name": "Surreal.Multiplication.numeric_mul_option",
"kind": "lemma",
"start": [
214,
1
]
},
{
"code": "lemma numeric_option_mul_option (hx : IsOption x' x) (hy : IsOption y' y) : (x' * y').Numeric :=\n ih (Args.P1 x' y') ((TransGen.single <| cutExpand_pair_right hy).tail <| cutExpand_pair_left hx)",
"end": [
218,
99
],
"full_name": "Surreal.Multiplication.numeric_option_mul_option",
"kind": "lemma",
"start": [
217,
1
]
},
{
"code": "lemma ih1 : IH1 x y := by\n rintro x₁ x₂ y' h₁ h₂ (rfl|hy) <;> apply ih (Args.P24 _ _ _)\n on_goal 2 => refine TransGen.tail ?_ (cutExpand_pair_right hy)\n all_goals exact TransGen.single (cutExpand_double_left h₁ h₂)",
"end": [
223,
64
],
"full_name": "Surreal.Multiplication.ih1",
"kind": "lemma",
"start": [
220,
1
]
},
{
"code": "lemma ih1_swap : IH1 y x := ih1 <| by\n simp_rw [ArgsRel, InvImage, Args.toMultiset, Multiset.pair_comm] at ih ⊢\n exact ih",
"end": [
227,
11
],
"full_name": "Surreal.Multiplication.ih1_swap",
"kind": "lemma",
"start": [
225,
1
]
},
{
"code": "lemma P3_of_ih (hy : Numeric y) (ihyx : IH1 y x) (i k l) :\n P3 (x.moveLeft i) x (y.moveLeft k) (-(-y).moveLeft l) :=\n P3_comm.2 <| ((ihyx (IsOption.moveLeft k) (isOption_neg.1 <| .moveLeft l) <| Or.inl rfl).2\n (by rw [← moveRight_neg_symm]; apply hy.left_lt_right)).1 i",
"end": [
232,
64
],
"full_name": "Surreal.Multiplication.P3_of_ih",
"kind": "lemma",
"start": [
229,
1
]
},
{
"code": "lemma P24_of_ih (ihxy : IH1 x y) (i j) : P24 (x.moveLeft i) (x.moveLeft j) y :=\n ihxy (IsOption.moveLeft i) (IsOption.moveLeft j) (Or.inl rfl)",
"end": [
235,
64
],
"full_name": "Surreal.Multiplication.P24_of_ih",
"kind": "lemma",
"start": [
234,
1
]
},
{
"code": "lemma mulOption_lt_of_lt (i j k l) (h : x.moveLeft i < x.moveLeft j) :\n (⟦mulOption x y i k⟧ : Game) < -⟦mulOption x (-y) j l⟧ :=\n mulOption_lt_iff_P1.2 <| P1_of_lt (P3_of_ih hy ihyx j k l) <| ((P24_of_ih ihxy i j).2 h).1 k",
"end": [
245,
95
],
"full_name": "Surreal.Multiplication.mulOption_lt_of_lt",
"kind": "lemma",
"start": [
243,
1
]
},
{
"code": "lemma mulOption_lt (i j k l) : (⟦mulOption x y i k⟧ : Game) < -⟦mulOption x (-y) j l⟧ := by\n obtain (h|h|h) := lt_or_equiv_or_gt (hx.moveLeft i) (hx.moveLeft j)\n · exact mulOption_lt_of_lt hy ihxy ihyx i j k l h\n · have ml := @IsOption.moveLeft\n exact mulOption_lt_iff_P1.2 (P1_of_eq h (P24_of_ih ihxy i j).1\n (ihxy (ml i) (ml j) <| Or.inr <| isOption_neg.1 <| ml l).1 <| P3_of_ih hy ihyx i k l)\n · rw [mulOption_neg_neg, lt_neg]\n exact mulOption_lt_of_lt hy.neg (ih1_neg_right ihxy) (ih1_neg_left ihyx) j i l _ h",
"end": [
254,
87
],
"full_name": "Surreal.Multiplication.mulOption_lt",
"kind": "lemma",
"start": [
247,
1
]
},
{
"code": "theorem P1_of_ih : (x * y).Numeric",
"end": [
281,
56
],
"full_name": "Surreal.Multiplication.P1_of_ih",
"kind": "commanddeclaration",
"start": [
258,
1
]
},
{
"code": "def IH24 (x₁ x₂ y : PGame) : Prop :=\n ∀ ⦃z⦄, (IsOption z x₁ → P24 z x₂ y) ∧ (IsOption z x₂ → P24 x₁ z y) ∧ (IsOption z y → P24 x₁ x₂ z)",
"end": [
285,
100
],
"full_name": "Surreal.Multiplication.IH24",
"kind": "commanddeclaration",
"start": [
283,
1
]
},
{
"code": "def IH4 (x₁ x₂ y : PGame) : Prop :=\n ∀ ⦃z w⦄, IsOption w y → (IsOption z x₁ → P2 z x₂ w) ∧ (IsOption z x₂ → P2 x₁ z w)",
"end": [
289,
84
],
"full_name": "Surreal.Multiplication.IH4",
"kind": "commanddeclaration",
"start": [
287,
1
]
},
{
"code": "lemma ih₁₂ : IH24 x₁ x₂ y := by\n rw [IH24]\n refine fun z ↦ ⟨?_, ?_, ?_⟩ <;>\n refine fun h ↦ ih' (Args.P24 _ _ _) (TransGen.single ?_)\n · exact (cutExpand_add_right {y}).2 (cutExpand_pair_left h)\n · exact (cutExpand_add_left {x₁}).2 (cutExpand_pair_left h)\n · exact (cutExpand_add_left {x₁}).2 (cutExpand_pair_right h)",
"end": [
301,
63
],
"full_name": "Surreal.Multiplication.ih₁₂",
"kind": "lemma",
"start": [
295,
1
]
},
{
"code": "lemma ih₂₁ : IH24 x₂ x₁ y := ih₁₂ <| by\n simp_rw [ArgsRel, InvImage, Args.toMultiset, Multiset.pair_comm] at ih' ⊢\n suffices {x₁, y, x₂} = {x₂, y, x₁} by rwa [← this]\n dsimp only [Multiset.insert_eq_cons, ← Multiset.singleton_add] at ih' ⊢\n abel",
"end": [
307,
7
],
"full_name": "Surreal.Multiplication.ih₂₁",
"kind": "lemma",
"start": [
303,
1
]
},
{
"code": "lemma ih4 : IH4 x₁ x₂ y := by\n refine fun z w h ↦ ⟨?_, ?_⟩\n all_goals\n intro h'\n apply (ih' (Args.P24 _ _ _) <| (TransGen.single _).tail <|\n (cutExpand_add_left {x₁}).2 <| cutExpand_pair_right h).1\n try exact (cutExpand_add_right {w}).2 <| cutExpand_pair_left h'\n try exact (cutExpand_add_right {w}).2 <| cutExpand_pair_right h'",
"end": [
316,
69
],
"full_name": "Surreal.Multiplication.ih4",
"kind": "lemma",
"start": [
309,
1
]
},
{
"code": "lemma numeric_of_ih : (x₁ * y).Numeric ∧ (x₂ * y).Numeric := by\n constructor <;> refine ih' (Args.P1 _ _) (TransGen.single ?_)\n · exact (cutExpand_add_right {y}).2 <| (cutExpand_add_left {x₁}).2 cutExpand_zero\n · exact (cutExpand_add_right {x₂, y}).2 cutExpand_zero",
"end": [
321,
57
],
"full_name": "Surreal.Multiplication.numeric_of_ih",
"kind": "lemma",
"start": [
318,
1
]
},
{
"code": "lemma ih24_neg : IH24 x₁ x₂ y → IH24 (-x₂) (-x₁) y ∧ IH24 x₁ x₂ (-y) := by\n simp_rw [IH24, ← P24_neg_right, isOption_neg]\n refine fun h ↦ ⟨fun z ↦ ⟨?_, ?_, ?_⟩,\n fun z ↦ ⟨(@h z).1, (@h z).2.1, P24_neg_right.2 ∘ (@h <| -z).2.2⟩⟩\n all_goals\n rw [P24_neg_left]\n simp only [neg_neg]\n first | exact (@h <| -z).2.1 | exact (@h <| -z).1 | exact (@h z).2.2",
"end": [
331,
73
],
"full_name": "Surreal.Multiplication.ih24_neg",
"kind": "lemma",
"start": [
323,
1
]
},
{
"code": "lemma ih4_neg : IH4 x₁ x₂ y → IH4 (-x₂) (-x₁) y ∧ IH4 x₁ x₂ (-y) := by\n simp_rw [IH4, isOption_neg]\n refine fun h ↦ ⟨fun z w h' ↦ ?_, fun z w h' ↦ ?_⟩\n · convert (h h').symm using 2 <;> rw [P2_neg_left, neg_neg]\n · convert h h' using 2 <;> rw [P2_neg_right]",
"end": [
338,
47
],
"full_name": "Surreal.Multiplication.ih4_neg",
"kind": "lemma",
"start": [
333,
1
]
},
{
"code": "lemma mulOption_lt_mul_of_equiv (hn : x₁.Numeric) (h : IH24 x₁ x₂ y) (he : x₁ ≈ x₂) (i j) :\n ⟦mulOption x₁ y i j⟧ < (⟦x₂ * y⟧ : Game) := by\n convert sub_lt_iff_lt_add'.2 ((((@h _).1 <| IsOption.moveLeft i).2 _).1 j) using 1\n · rw [← ((@h _).2.2 <| IsOption.moveLeft j).1 he]\n rfl\n · rw [← lt_congr_right he]\n apply hn.moveLeft_lt",
"end": [
346,
25
],
"full_name": "Surreal.Multiplication.mulOption_lt_mul_of_equiv",
"kind": "lemma",
"start": [
340,
1
]
},
{
"code": "theorem mul_right_le_of_equiv (h₁ : x₁.Numeric) (h₂ : x₂.Numeric)\n (h₁₂ : IH24 x₁ x₂ y) (h₂₁ : IH24 x₂ x₁ y) (he : x₁ ≈ x₂) : x₁ * y ≤ x₂ * y",
"end": [
362,
73
],
"full_name": "Surreal.Multiplication.mul_right_le_of_equiv",
"kind": "commanddeclaration",
"start": [
348,
1
]
},
{
"code": "def MulOptionsLTMul (x y : PGame) : Prop := ∀ ⦃i j⦄, ⟦mulOption x y i j⟧ < (⟦x * y⟧ : Game)",
"end": [
365,
92
],
"full_name": "Surreal.Multiplication.MulOptionsLTMul",
"kind": "commanddeclaration",
"start": [
364,
1
]
},
{
"code": "lemma mulOptionsLTMul_of_numeric (hn : (x * y).Numeric) :\n (MulOptionsLTMul x y ∧ MulOptionsLTMul (-x) (-y)) ∧\n (MulOptionsLTMul x (-y) ∧ MulOptionsLTMul (-x) y) := by\n constructor\n · have h := hn.moveLeft_lt\n simp_rw [lt_iff_game_lt] at h\n convert (leftMoves_mul_iff <| GT.gt _).1 h\n rw [← quot_neg_mul_neg]\n rfl\n · have h := hn.lt_moveRight\n simp_rw [lt_iff_game_lt, rightMoves_mul_iff] at h\n refine h.imp ?_ ?_ <;> refine forall₂_imp fun a b ↦ ?_\n all_goals\n rw [lt_neg]\n first | rw [quot_mul_neg] | rw [quot_neg_mul]\n exact id",
"end": [
386,
15
],
"full_name": "Surreal.Multiplication.mulOptionsLTMul_of_numeric",
"kind": "lemma",
"start": [
367,
1
]
},
{
"code": "def IH3 (x₁ x' x₂ y₁ y₂ : PGame) : Prop :=\n P2 x₁ x' y₁ ∧ P2 x₁ x' y₂ ∧ P3 x' x₂ y₁ y₂ ∧ (x₁ < x' → P3 x₁ x' y₁ y₂)",
"end": [
395,
76
],
"full_name": "Surreal.Multiplication.IH3",
"kind": "commanddeclaration",
"start": [
388,
1
]
},
{
"code": "lemma ih3_of_ih (h24 : IH24 x₁ x₂ y) (h4 : IH4 x₁ x₂ y) (hl : MulOptionsLTMul x₂ y) (i j) :\n IH3 x₁ (x₂.moveLeft i) x₂ (y.moveLeft j) y :=\n have ml := @IsOption.moveLeft\n have h24 := (@h24 _).2.1 (ml i)\n ⟨(h4 <| ml j).2 (ml i), h24.1, mulOption_lt_mul_iff_P3.1 (@hl i j), fun l ↦ (h24.2 l).1 _⟩",
"end": [
401,
93
],
"full_name": "Surreal.Multiplication.ih3_of_ih",
"kind": "lemma",
"start": [
397,
1
]
},
{
"code": "lemma P3_of_le_left {y₁ y₂} (i) (h : IH3 x₁ (x₂.moveLeft i) x₂ y₁ y₂) (hl : x₁ ≤ x₂.moveLeft i) :\n P3 x₁ x₂ y₁ y₂ := by\n obtain (hl|he) := lt_or_equiv_of_le hl\n · exact (h.2.2.2 hl).trans h.2.2.1\n · rw [P3, h.1 he, h.2.1 he]\n exact h.2.2.1",
"end": [
408,
18
],
"full_name": "Surreal.Multiplication.P3_of_le_left",
"kind": "lemma",
"start": [
403,
1
]
},
{
"code": "theorem P3_of_lt {y₁ y₂} (h : ∀ i, IH3 x₁ (x₂.moveLeft i) x₂ y₁ y₂)\n (hs : ∀ i, IH3 (-x₂) ((-x₁).moveLeft i) (-x₁) y₁ y₂) (hl : x₁ < x₂) :\n P3 x₁ x₂ y₁ y₂",
"end": [
419,
45
],
"full_name": "Surreal.Multiplication.P3_of_lt",
"kind": "commanddeclaration",
"start": [
410,
1
]
},
{
"code": "theorem main (a : Args) : a.Numeric → P124 a",
"end": [
448,
50
],
"full_name": "Surreal.Multiplication.main",
"kind": "commanddeclaration",
"start": [
421,
1
]
},
{
"code": "theorem Numeric.mul : Numeric (x * y)",
"end": [
459,
80
],
"full_name": "SetTheory.PGame.Numeric.mul",
"kind": "commanddeclaration",
"start": [
459,
1
]
},
{
"code": "theorem P24 : P24 x₁ x₂ y",
"end": [
461,
75
],
"full_name": "SetTheory.PGame.P24",
"kind": "commanddeclaration",
"start": [
461,
1
]
},
{
"code": "theorem Equiv.mul_congr_left (he : x₁ ≈ x₂) : x₁ * y ≈ x₂ * y",
"end": [
464,
47
],
"full_name": "SetTheory.PGame.Equiv.mul_congr_left",
"kind": "commanddeclaration",
"start": [
463,
1
]
},
{
"code": "theorem Equiv.mul_congr_right (he : y₁ ≈ y₂) : x * y₁ ≈ x * y₂",
"end": [
467,
92
],
"full_name": "SetTheory.PGame.Equiv.mul_congr_right",
"kind": "commanddeclaration",
"start": [
466,
1
]
},
{
"code": "theorem Equiv.mul_congr (hx : x₁ ≈ x₂) (hy : y₁ ≈ y₂) : x₁ * y₁ ≈ x₂ * y₂",
"end": [
470,
74
],
"full_name": "SetTheory.PGame.Equiv.mul_congr",
"kind": "commanddeclaration",
"start": [
469,
1
]
},
{
"code": "theorem P3_of_lt_of_lt (hx : x₁ < x₂) (hy : y₁ < y₂) : P3 x₁ x₂ y₁ y₂",
"end": [
489,
72
],
"full_name": "SetTheory.PGame.P3_of_lt_of_lt",
"kind": "commanddeclaration",
"start": [
474,
1
]
},
{
"code": "theorem Numeric.mul_pos (hp₁ : 0 < x₁) (hp₂ : 0 < x₂) : 0 < x₁ * x₂",
"end": [
495,
13
],
"full_name": "SetTheory.PGame.Numeric.mul_pos",
"kind": "commanddeclaration",
"start": [
491,
1
]
}
] | 0 | Surreal.Multiplication.P3_comm | [
[
96,
52
],
[
98,
34
]
] | 0 | 2 | rw [P3, P3, add_comm] | x x₁ x₂ x₃ x' y y₁ y₂ y₃ y' : PGame
⊢ P3 x₁ x₂ y₁ y₂ ↔ P3 y₁ y₂ x₁ x₂ | x x₁ x₂ x₃ x' y y₁ y₂ y₃ y' : PGame
⊢ ⟦x₂ * y₁⟧ + ⟦x₁ * y₂⟧ < ⟦x₁ * y₁⟧ + ⟦x₂ * y₂⟧ ↔ ⟦y₁ * x₂⟧ + ⟦y₂ * x₁⟧ < ⟦y₁ * x₁⟧ + ⟦y₂ * x₂⟧ |
Mathlib/SetTheory/Surreal/Multiplication.lean | [
[
"Mathlib.SetTheory.Surreal.Basic",
"Mathlib/SetTheory/Surreal/Basic.lean"
],
[
"Mathlib.Logic.Hydra",
"Mathlib/Logic/Hydra.lean"
],
[
"Init",
".lake/packages/lean4/src/lean/Init.lean"
]
] | [
{
"code": "def P1 (x₁ x₂ x₃ y₁ y₂ y₃ : PGame) :=\n ⟦x₁ * y₁⟧ + ⟦x₂ * y₂⟧ - ⟦x₁ * y₂⟧ < ⟦x₃ * y₁⟧ + ⟦x₂ * y₃⟧ - (⟦x₃ * y₃⟧ : Game)",
"end": [
74,
81
],
"full_name": "Surreal.Multiplication.P1",
"kind": "commanddeclaration",
"start": [
71,
1
]
},
{
"code": "def P2 (x₁ x₂ y : PGame) := x₁ ≈ x₂ → ⟦x₁ * y⟧ = (⟦x₂ * y⟧ : Game)",
"end": [
77,
67
],
"full_name": "Surreal.Multiplication.P2",
"kind": "commanddeclaration",
"start": [
76,
1
]
},
{
"code": "def P3 (x₁ x₂ y₁ y₂ : PGame) := ⟦x₁ * y₂⟧ + ⟦x₂ * y₁⟧ < ⟦x₁ * y₁⟧ + (⟦x₂ * y₂⟧ : Game)",
"end": [
80,
87
],
"full_name": "Surreal.Multiplication.P3",
"kind": "commanddeclaration",
"start": [
79,
1
]
},
{
"code": "def P4 (x₁ x₂ y : PGame) :=\n x₁ < x₂ → (∀ i, P3 x₁ x₂ (y.moveLeft i) y) ∧ ∀ j, P3 x₁ x₂ ((-y).moveLeft j) (-y)",
"end": [
87,
84
],
"full_name": "Surreal.Multiplication.P4",
"kind": "commanddeclaration",
"start": [
82,
1
]
},
{
"code": "def P24 (x₁ x₂ y : PGame) : Prop := P2 x₁ x₂ y ∧ P4 x₁ x₂ y",
"end": [
90,
60
],
"full_name": "Surreal.Multiplication.P24",
"kind": "commanddeclaration",
"start": [
89,
1
]
},
{
"code": "lemma P3_comm : P3 x₁ x₂ y₁ y₂ ↔ P3 y₁ y₂ x₁ x₂ := by\n rw [P3, P3, add_comm]\n congr! 2 <;> rw [quot_mul_comm]",
"end": [
98,
34
],
"full_name": "Surreal.Multiplication.P3_comm",
"kind": "lemma",
"start": [
96,
1
]
},
{
"code": "lemma P3.trans (h₁ : P3 x₁ x₂ y₁ y₂) (h₂ : P3 x₂ x₃ y₁ y₂) : P3 x₁ x₃ y₁ y₂ := by\n rw [P3] at h₁ h₂\n rw [P3, ← add_lt_add_iff_left (⟦x₂ * y₁⟧ + ⟦x₂ * y₂⟧)]\n convert add_lt_add h₁ h₂ using 1 <;> abel",
"end": [
103,
44
],
"full_name": "Surreal.Multiplication.P3.trans",
"kind": "lemma",
"start": [
100,
1
]
},
{
"code": "lemma P3_neg : P3 x₁ x₂ y₁ y₂ ↔ P3 (-x₂) (-x₁) y₁ y₂ := by\n simp_rw [P3, quot_neg_mul]\n rw [← _root_.neg_lt_neg_iff]\n abel_nf",
"end": [
108,
10
],
"full_name": "Surreal.Multiplication.P3_neg",
"kind": "lemma",
"start": [
105,
1
]
},
{
"code": "lemma P2_neg_left : P2 x₁ x₂ y ↔ P2 (-x₂) (-x₁) y := by\n rw [P2, P2]\n constructor\n · rw [quot_neg_mul, quot_neg_mul, eq_comm, neg_inj, neg_equiv_neg_iff, PGame.equiv_comm]\n exact (· ·)\n · rw [PGame.equiv_comm, neg_equiv_neg_iff, quot_neg_mul, quot_neg_mul, neg_inj, eq_comm]\n exact (· ·)",
"end": [
116,
16
],
"full_name": "Surreal.Multiplication.P2_neg_left",
"kind": "lemma",
"start": [
110,
1
]
},
{
"code": "lemma P2_neg_right : P2 x₁ x₂ y ↔ P2 x₁ x₂ (-y) := by\n rw [P2, P2, quot_mul_neg, quot_mul_neg, neg_inj]",
"end": [
119,
51
],
"full_name": "Surreal.Multiplication.P2_neg_right",
"kind": "lemma",
"start": [
118,
1
]
},
{
"code": "lemma P4_neg_left : P4 x₁ x₂ y ↔ P4 (-x₂) (-x₁) y := by\n simp_rw [P4, PGame.neg_lt_neg_iff, moveLeft_neg', ← P3_neg]",
"end": [
122,
62
],
"full_name": "Surreal.Multiplication.P4_neg_left",
"kind": "lemma",
"start": [
121,
1
]
},
{
"code": "lemma P4_neg_right : P4 x₁ x₂ y ↔ P4 x₁ x₂ (-y) := by\n rw [P4, P4, neg_neg, and_comm]",
"end": [
125,
33
],
"full_name": "Surreal.Multiplication.P4_neg_right",
"kind": "lemma",
"start": [
124,
1
]
},
{
"code": "lemma P24_neg_left : P24 x₁ x₂ y ↔ P24 (-x₂) (-x₁) y := by rw [P24, P24, P2_neg_left, P4_neg_left]",
"end": [
127,
99
],
"full_name": "Surreal.Multiplication.P24_neg_left",
"kind": "lemma",
"start": [
127,
1
]
},
{
"code": "lemma P24_neg_right : P24 x₁ x₂ y ↔ P24 x₁ x₂ (-y) := by rw [P24, P24, P2_neg_right, P4_neg_right]",
"end": [
128,
99
],
"full_name": "Surreal.Multiplication.P24_neg_right",
"kind": "lemma",
"start": [
128,
1
]
},
{
"code": "lemma mulOption_lt_iff_P1 {i j k l} :\n (⟦mulOption x y i k⟧ : Game) < -⟦mulOption x (-y) j l⟧ ↔\n P1 (x.moveLeft i) x (x.moveLeft j) y (y.moveLeft k) (-(-y).moveLeft l) := by\n dsimp only [P1, mulOption, quot_sub, quot_add]\n simp_rw [neg_sub', neg_add, quot_mul_neg, neg_neg]",
"end": [
136,
53
],
"full_name": "Surreal.Multiplication.mulOption_lt_iff_P1",
"kind": "lemma",
"start": [
132,
1
]
},
{
"code": "lemma mulOption_lt_mul_iff_P3 {i j} :\n ⟦mulOption x y i j⟧ < (⟦x * y⟧ : Game) ↔ P3 (x.moveLeft i) x (y.moveLeft j) y := by\n dsimp only [mulOption, quot_sub, quot_add]\n exact sub_lt_iff_lt_add'",
"end": [
141,
27
],
"full_name": "Surreal.Multiplication.mulOption_lt_mul_iff_P3",
"kind": "lemma",
"start": [
138,
1
]
},
{
"code": "lemma P1_of_eq (he : x₁ ≈ x₃) (h₁ : P2 x₁ x₃ y₁) (h₃ : P2 x₁ x₃ y₃) (h3 : P3 x₁ x₂ y₂ y₃) :\n P1 x₁ x₂ x₃ y₁ y₂ y₃ := by\n rw [P1, ← h₁ he, ← h₃ he, sub_lt_sub_iff]\n convert add_lt_add_left h3 ⟦x₁ * y₁⟧ using 1 <;> abel",
"end": [
146,
56
],
"full_name": "Surreal.Multiplication.P1_of_eq",
"kind": "lemma",
"start": [
143,
1
]
},
{
"code": "lemma P1_of_lt (h₁ : P3 x₃ x₂ y₂ y₃) (h₂ : P3 x₁ x₃ y₂ y₁) : P1 x₁ x₂ x₃ y₁ y₂ y₃ := by\n rw [P1, sub_lt_sub_iff, ← add_lt_add_iff_left ⟦x₃ * y₂⟧]\n convert add_lt_add h₁ h₂ using 1 <;> abel",
"end": [
150,
44
],
"full_name": "Surreal.Multiplication.P1_of_lt",
"kind": "lemma",
"start": [
148,
1
]
},
{
"code": "inductive Args : Type (u+1)\n | P1 (x y : PGame.{u}) : Args\n | P24 (x₁ x₂ y : PGame.{u}) : Args",
"end": [
155,
37
],
"full_name": "Surreal.Multiplication.Args",
"kind": "commanddeclaration",
"start": [
152,
1
]
},
{
"code": "def Args.toMultiset : Args → Multiset PGame\n | (Args.P1 x y) => {x, y}\n | (Args.P24 x₁ x₂ y) => {x₁, x₂, y}",
"end": [
160,
38
],
"full_name": "Surreal.Multiplication.Args.toMultiset",
"kind": "commanddeclaration",
"start": [
157,
1
]
},
{
"code": "def Args.Numeric (a : Args) := ∀ x ∈ a.toMultiset, SetTheory.PGame.Numeric x",
"end": [
163,
77
],
"full_name": "Surreal.Multiplication.Args.Numeric",
"kind": "commanddeclaration",
"start": [
162,
1
]
},
{
"code": "lemma Args.numeric_P1 {x y} : (Args.P1 x y).Numeric ↔ x.Numeric ∧ y.Numeric := by\n simp [Args.Numeric, Args.toMultiset]",
"end": [
166,
39
],
"full_name": "Surreal.Multiplication.Args.numeric_P1",
"kind": "lemma",
"start": [
165,
1
]
},
{
"code": "lemma Args.numeric_P24 {x₁ x₂ y} :\n (Args.P24 x₁ x₂ y).Numeric ↔ x₁.Numeric ∧ x₂.Numeric ∧ y.Numeric := by\n simp [Args.Numeric, Args.toMultiset]",
"end": [
170,
39
],
"full_name": "Surreal.Multiplication.Args.numeric_P24",
"kind": "lemma",
"start": [
168,
1
]
},
{
"code": "def ArgsRel := InvImage (TransGen <| CutExpand IsOption) Args.toMultiset",
"end": [
177,
73
],
"full_name": "Surreal.Multiplication.ArgsRel",
"kind": "commanddeclaration",
"start": [
174,
1
]
},
{
"code": "theorem argsRel_wf : WellFounded ArgsRel",
"end": [
180,
89
],
"full_name": "Surreal.Multiplication.argsRel_wf",
"kind": "commanddeclaration",
"start": [
179,
1
]
},
{
"code": "def P124 : Args → Prop\n | (Args.P1 x y) => Numeric (x * y)\n | (Args.P24 x₁ x₂ y) => P24 x₁ x₂ y",
"end": [
185,
38
],
"full_name": "Surreal.Multiplication.P124",
"kind": "commanddeclaration",
"start": [
182,
1
]
},
{
"code": "lemma ArgsRel.numeric_closed {a' a} : ArgsRel a' a → a.Numeric → a'.Numeric :=\n TransGen.closed' <| @cutExpand_closed _ IsOption ⟨wf_isOption.isIrrefl.1⟩ _ Numeric.isOption",
"end": [
189,
95
],
"full_name": "Surreal.Multiplication.ArgsRel.numeric_closed",
"kind": "lemma",
"start": [
187,
1
]
},
{
"code": "def IH1 (x y : PGame) : Prop :=\n ∀ ⦃x₁ x₂ y'⦄, IsOption x₁ x → IsOption x₂ x → (y' = y ∨ IsOption y' y) → P24 x₁ x₂ y'",
"end": [
193,
88
],
"full_name": "Surreal.Multiplication.IH1",
"kind": "commanddeclaration",
"start": [
191,
1
]
},
{
"code": "lemma ih1_neg_left : IH1 x y → IH1 (-x) y :=\n fun h x₁ x₂ y' h₁ h₂ hy ↦ by\n rw [isOption_neg] at h₁ h₂\n exact P24_neg_left.2 (h h₂ h₁ hy)",
"end": [
200,
38
],
"full_name": "Surreal.Multiplication.ih1_neg_left",
"kind": "lemma",
"start": [
197,
1
]
},
{
"code": "lemma ih1_neg_right : IH1 x y → IH1 x (-y) :=\n fun h x₁ x₂ y' ↦ by\n rw [← neg_eq_iff_eq_neg, isOption_neg, P24_neg_right]\n apply h",
"end": [
205,
12
],
"full_name": "Surreal.Multiplication.ih1_neg_right",
"kind": "lemma",
"start": [
202,
1
]
},
{
"code": "lemma numeric_option_mul (h : IsOption x' x) : (x' * y).Numeric :=\n ih (Args.P1 x' y) (TransGen.single <| cutExpand_pair_left h)",
"end": [
212,
63
],
"full_name": "Surreal.Multiplication.numeric_option_mul",
"kind": "lemma",
"start": [
211,
1
]
},
{
"code": "lemma numeric_mul_option (h : IsOption y' y) : (x * y').Numeric :=\n ih (Args.P1 x y') (TransGen.single <| cutExpand_pair_right h)",
"end": [
215,
64
],
"full_name": "Surreal.Multiplication.numeric_mul_option",
"kind": "lemma",
"start": [
214,
1
]
},
{
"code": "lemma numeric_option_mul_option (hx : IsOption x' x) (hy : IsOption y' y) : (x' * y').Numeric :=\n ih (Args.P1 x' y') ((TransGen.single <| cutExpand_pair_right hy).tail <| cutExpand_pair_left hx)",
"end": [
218,
99
],
"full_name": "Surreal.Multiplication.numeric_option_mul_option",
"kind": "lemma",
"start": [
217,
1
]
},
{
"code": "lemma ih1 : IH1 x y := by\n rintro x₁ x₂ y' h₁ h₂ (rfl|hy) <;> apply ih (Args.P24 _ _ _)\n on_goal 2 => refine TransGen.tail ?_ (cutExpand_pair_right hy)\n all_goals exact TransGen.single (cutExpand_double_left h₁ h₂)",
"end": [
223,
64
],
"full_name": "Surreal.Multiplication.ih1",
"kind": "lemma",
"start": [
220,
1
]
},
{
"code": "lemma ih1_swap : IH1 y x := ih1 <| by\n simp_rw [ArgsRel, InvImage, Args.toMultiset, Multiset.pair_comm] at ih ⊢\n exact ih",
"end": [
227,
11
],
"full_name": "Surreal.Multiplication.ih1_swap",
"kind": "lemma",
"start": [
225,
1
]
},
{
"code": "lemma P3_of_ih (hy : Numeric y) (ihyx : IH1 y x) (i k l) :\n P3 (x.moveLeft i) x (y.moveLeft k) (-(-y).moveLeft l) :=\n P3_comm.2 <| ((ihyx (IsOption.moveLeft k) (isOption_neg.1 <| .moveLeft l) <| Or.inl rfl).2\n (by rw [← moveRight_neg_symm]; apply hy.left_lt_right)).1 i",
"end": [
232,
64
],
"full_name": "Surreal.Multiplication.P3_of_ih",
"kind": "lemma",
"start": [
229,
1
]
},
{
"code": "lemma P24_of_ih (ihxy : IH1 x y) (i j) : P24 (x.moveLeft i) (x.moveLeft j) y :=\n ihxy (IsOption.moveLeft i) (IsOption.moveLeft j) (Or.inl rfl)",
"end": [
235,
64
],
"full_name": "Surreal.Multiplication.P24_of_ih",
"kind": "lemma",
"start": [
234,
1
]
},
{
"code": "lemma mulOption_lt_of_lt (i j k l) (h : x.moveLeft i < x.moveLeft j) :\n (⟦mulOption x y i k⟧ : Game) < -⟦mulOption x (-y) j l⟧ :=\n mulOption_lt_iff_P1.2 <| P1_of_lt (P3_of_ih hy ihyx j k l) <| ((P24_of_ih ihxy i j).2 h).1 k",
"end": [
245,
95
],
"full_name": "Surreal.Multiplication.mulOption_lt_of_lt",
"kind": "lemma",
"start": [
243,
1
]
},
{
"code": "lemma mulOption_lt (i j k l) : (⟦mulOption x y i k⟧ : Game) < -⟦mulOption x (-y) j l⟧ := by\n obtain (h|h|h) := lt_or_equiv_or_gt (hx.moveLeft i) (hx.moveLeft j)\n · exact mulOption_lt_of_lt hy ihxy ihyx i j k l h\n · have ml := @IsOption.moveLeft\n exact mulOption_lt_iff_P1.2 (P1_of_eq h (P24_of_ih ihxy i j).1\n (ihxy (ml i) (ml j) <| Or.inr <| isOption_neg.1 <| ml l).1 <| P3_of_ih hy ihyx i k l)\n · rw [mulOption_neg_neg, lt_neg]\n exact mulOption_lt_of_lt hy.neg (ih1_neg_right ihxy) (ih1_neg_left ihyx) j i l _ h",
"end": [
254,
87
],
"full_name": "Surreal.Multiplication.mulOption_lt",
"kind": "lemma",
"start": [
247,
1
]
},
{
"code": "theorem P1_of_ih : (x * y).Numeric",
"end": [
281,
56
],
"full_name": "Surreal.Multiplication.P1_of_ih",
"kind": "commanddeclaration",
"start": [
258,
1
]
},
{
"code": "def IH24 (x₁ x₂ y : PGame) : Prop :=\n ∀ ⦃z⦄, (IsOption z x₁ → P24 z x₂ y) ∧ (IsOption z x₂ → P24 x₁ z y) ∧ (IsOption z y → P24 x₁ x₂ z)",
"end": [
285,
100
],
"full_name": "Surreal.Multiplication.IH24",
"kind": "commanddeclaration",
"start": [
283,
1
]
},
{
"code": "def IH4 (x₁ x₂ y : PGame) : Prop :=\n ∀ ⦃z w⦄, IsOption w y → (IsOption z x₁ → P2 z x₂ w) ∧ (IsOption z x₂ → P2 x₁ z w)",
"end": [
289,
84
],
"full_name": "Surreal.Multiplication.IH4",
"kind": "commanddeclaration",
"start": [
287,
1
]
},
{
"code": "lemma ih₁₂ : IH24 x₁ x₂ y := by\n rw [IH24]\n refine fun z ↦ ⟨?_, ?_, ?_⟩ <;>\n refine fun h ↦ ih' (Args.P24 _ _ _) (TransGen.single ?_)\n · exact (cutExpand_add_right {y}).2 (cutExpand_pair_left h)\n · exact (cutExpand_add_left {x₁}).2 (cutExpand_pair_left h)\n · exact (cutExpand_add_left {x₁}).2 (cutExpand_pair_right h)",
"end": [
301,
63
],
"full_name": "Surreal.Multiplication.ih₁₂",
"kind": "lemma",
"start": [
295,
1
]
},
{
"code": "lemma ih₂₁ : IH24 x₂ x₁ y := ih₁₂ <| by\n simp_rw [ArgsRel, InvImage, Args.toMultiset, Multiset.pair_comm] at ih' ⊢\n suffices {x₁, y, x₂} = {x₂, y, x₁} by rwa [← this]\n dsimp only [Multiset.insert_eq_cons, ← Multiset.singleton_add] at ih' ⊢\n abel",
"end": [
307,
7
],
"full_name": "Surreal.Multiplication.ih₂₁",
"kind": "lemma",
"start": [
303,
1
]
},
{
"code": "lemma ih4 : IH4 x₁ x₂ y := by\n refine fun z w h ↦ ⟨?_, ?_⟩\n all_goals\n intro h'\n apply (ih' (Args.P24 _ _ _) <| (TransGen.single _).tail <|\n (cutExpand_add_left {x₁}).2 <| cutExpand_pair_right h).1\n try exact (cutExpand_add_right {w}).2 <| cutExpand_pair_left h'\n try exact (cutExpand_add_right {w}).2 <| cutExpand_pair_right h'",
"end": [
316,
69
],
"full_name": "Surreal.Multiplication.ih4",
"kind": "lemma",
"start": [
309,
1
]
},
{
"code": "lemma numeric_of_ih : (x₁ * y).Numeric ∧ (x₂ * y).Numeric := by\n constructor <;> refine ih' (Args.P1 _ _) (TransGen.single ?_)\n · exact (cutExpand_add_right {y}).2 <| (cutExpand_add_left {x₁}).2 cutExpand_zero\n · exact (cutExpand_add_right {x₂, y}).2 cutExpand_zero",
"end": [
321,
57
],
"full_name": "Surreal.Multiplication.numeric_of_ih",
"kind": "lemma",
"start": [
318,
1
]
},
{
"code": "lemma ih24_neg : IH24 x₁ x₂ y → IH24 (-x₂) (-x₁) y ∧ IH24 x₁ x₂ (-y) := by\n simp_rw [IH24, ← P24_neg_right, isOption_neg]\n refine fun h ↦ ⟨fun z ↦ ⟨?_, ?_, ?_⟩,\n fun z ↦ ⟨(@h z).1, (@h z).2.1, P24_neg_right.2 ∘ (@h <| -z).2.2⟩⟩\n all_goals\n rw [P24_neg_left]\n simp only [neg_neg]\n first | exact (@h <| -z).2.1 | exact (@h <| -z).1 | exact (@h z).2.2",
"end": [
331,
73
],
"full_name": "Surreal.Multiplication.ih24_neg",
"kind": "lemma",
"start": [
323,
1
]
},
{
"code": "lemma ih4_neg : IH4 x₁ x₂ y → IH4 (-x₂) (-x₁) y ∧ IH4 x₁ x₂ (-y) := by\n simp_rw [IH4, isOption_neg]\n refine fun h ↦ ⟨fun z w h' ↦ ?_, fun z w h' ↦ ?_⟩\n · convert (h h').symm using 2 <;> rw [P2_neg_left, neg_neg]\n · convert h h' using 2 <;> rw [P2_neg_right]",
"end": [
338,
47
],
"full_name": "Surreal.Multiplication.ih4_neg",
"kind": "lemma",
"start": [
333,
1
]
},
{
"code": "lemma mulOption_lt_mul_of_equiv (hn : x₁.Numeric) (h : IH24 x₁ x₂ y) (he : x₁ ≈ x₂) (i j) :\n ⟦mulOption x₁ y i j⟧ < (⟦x₂ * y⟧ : Game) := by\n convert sub_lt_iff_lt_add'.2 ((((@h _).1 <| IsOption.moveLeft i).2 _).1 j) using 1\n · rw [← ((@h _).2.2 <| IsOption.moveLeft j).1 he]\n rfl\n · rw [← lt_congr_right he]\n apply hn.moveLeft_lt",
"end": [
346,
25
],
"full_name": "Surreal.Multiplication.mulOption_lt_mul_of_equiv",
"kind": "lemma",
"start": [
340,
1
]
},
{
"code": "theorem mul_right_le_of_equiv (h₁ : x₁.Numeric) (h₂ : x₂.Numeric)\n (h₁₂ : IH24 x₁ x₂ y) (h₂₁ : IH24 x₂ x₁ y) (he : x₁ ≈ x₂) : x₁ * y ≤ x₂ * y",
"end": [
362,
73
],
"full_name": "Surreal.Multiplication.mul_right_le_of_equiv",
"kind": "commanddeclaration",
"start": [
348,
1
]
},
{
"code": "def MulOptionsLTMul (x y : PGame) : Prop := ∀ ⦃i j⦄, ⟦mulOption x y i j⟧ < (⟦x * y⟧ : Game)",
"end": [
365,
92
],
"full_name": "Surreal.Multiplication.MulOptionsLTMul",
"kind": "commanddeclaration",
"start": [
364,
1
]
},
{
"code": "lemma mulOptionsLTMul_of_numeric (hn : (x * y).Numeric) :\n (MulOptionsLTMul x y ∧ MulOptionsLTMul (-x) (-y)) ∧\n (MulOptionsLTMul x (-y) ∧ MulOptionsLTMul (-x) y) := by\n constructor\n · have h := hn.moveLeft_lt\n simp_rw [lt_iff_game_lt] at h\n convert (leftMoves_mul_iff <| GT.gt _).1 h\n rw [← quot_neg_mul_neg]\n rfl\n · have h := hn.lt_moveRight\n simp_rw [lt_iff_game_lt, rightMoves_mul_iff] at h\n refine h.imp ?_ ?_ <;> refine forall₂_imp fun a b ↦ ?_\n all_goals\n rw [lt_neg]\n first | rw [quot_mul_neg] | rw [quot_neg_mul]\n exact id",
"end": [
386,
15
],
"full_name": "Surreal.Multiplication.mulOptionsLTMul_of_numeric",
"kind": "lemma",
"start": [
367,
1
]
},
{
"code": "def IH3 (x₁ x' x₂ y₁ y₂ : PGame) : Prop :=\n P2 x₁ x' y₁ ∧ P2 x₁ x' y₂ ∧ P3 x' x₂ y₁ y₂ ∧ (x₁ < x' → P3 x₁ x' y₁ y₂)",
"end": [
395,
76
],
"full_name": "Surreal.Multiplication.IH3",
"kind": "commanddeclaration",
"start": [
388,
1
]
},
{
"code": "lemma ih3_of_ih (h24 : IH24 x₁ x₂ y) (h4 : IH4 x₁ x₂ y) (hl : MulOptionsLTMul x₂ y) (i j) :\n IH3 x₁ (x₂.moveLeft i) x₂ (y.moveLeft j) y :=\n have ml := @IsOption.moveLeft\n have h24 := (@h24 _).2.1 (ml i)\n ⟨(h4 <| ml j).2 (ml i), h24.1, mulOption_lt_mul_iff_P3.1 (@hl i j), fun l ↦ (h24.2 l).1 _⟩",
"end": [
401,
93
],
"full_name": "Surreal.Multiplication.ih3_of_ih",
"kind": "lemma",
"start": [
397,
1
]
},
{
"code": "lemma P3_of_le_left {y₁ y₂} (i) (h : IH3 x₁ (x₂.moveLeft i) x₂ y₁ y₂) (hl : x₁ ≤ x₂.moveLeft i) :\n P3 x₁ x₂ y₁ y₂ := by\n obtain (hl|he) := lt_or_equiv_of_le hl\n · exact (h.2.2.2 hl).trans h.2.2.1\n · rw [P3, h.1 he, h.2.1 he]\n exact h.2.2.1",
"end": [
408,
18
],
"full_name": "Surreal.Multiplication.P3_of_le_left",
"kind": "lemma",
"start": [
403,
1
]
},
{
"code": "theorem P3_of_lt {y₁ y₂} (h : ∀ i, IH3 x₁ (x₂.moveLeft i) x₂ y₁ y₂)\n (hs : ∀ i, IH3 (-x₂) ((-x₁).moveLeft i) (-x₁) y₁ y₂) (hl : x₁ < x₂) :\n P3 x₁ x₂ y₁ y₂",
"end": [
419,
45
],
"full_name": "Surreal.Multiplication.P3_of_lt",
"kind": "commanddeclaration",
"start": [
410,
1
]
},
{
"code": "theorem main (a : Args) : a.Numeric → P124 a",
"end": [
448,
50
],
"full_name": "Surreal.Multiplication.main",
"kind": "commanddeclaration",
"start": [
421,
1
]
},
{
"code": "theorem Numeric.mul : Numeric (x * y)",
"end": [
459,
80
],
"full_name": "SetTheory.PGame.Numeric.mul",
"kind": "commanddeclaration",
"start": [
459,
1
]
},
{
"code": "theorem P24 : P24 x₁ x₂ y",
"end": [
461,
75
],
"full_name": "SetTheory.PGame.P24",
"kind": "commanddeclaration",
"start": [
461,
1
]
},
{
"code": "theorem Equiv.mul_congr_left (he : x₁ ≈ x₂) : x₁ * y ≈ x₂ * y",
"end": [
464,
47
],
"full_name": "SetTheory.PGame.Equiv.mul_congr_left",
"kind": "commanddeclaration",
"start": [
463,
1
]
},
{
"code": "theorem Equiv.mul_congr_right (he : y₁ ≈ y₂) : x * y₁ ≈ x * y₂",
"end": [
467,
92
],
"full_name": "SetTheory.PGame.Equiv.mul_congr_right",
"kind": "commanddeclaration",
"start": [
466,
1
]
},
{
"code": "theorem Equiv.mul_congr (hx : x₁ ≈ x₂) (hy : y₁ ≈ y₂) : x₁ * y₁ ≈ x₂ * y₂",
"end": [
470,
74
],
"full_name": "SetTheory.PGame.Equiv.mul_congr",
"kind": "commanddeclaration",
"start": [
469,
1
]
},
{
"code": "theorem P3_of_lt_of_lt (hx : x₁ < x₂) (hy : y₁ < y₂) : P3 x₁ x₂ y₁ y₂",
"end": [
489,
72
],
"full_name": "SetTheory.PGame.P3_of_lt_of_lt",
"kind": "commanddeclaration",
"start": [
474,
1
]
},
{
"code": "theorem Numeric.mul_pos (hp₁ : 0 < x₁) (hp₂ : 0 < x₂) : 0 < x₁ * x₂",
"end": [
495,
13
],
"full_name": "SetTheory.PGame.Numeric.mul_pos",
"kind": "commanddeclaration",
"start": [
491,
1
]
}
] | 0 | Surreal.Multiplication.P3_comm | [
[
96,
52
],
[
98,
34
]
] | 1 | 2 | congr! 2 <;> rw [quot_mul_comm] | x x₁ x₂ x₃ x' y y₁ y₂ y₃ y' : PGame
⊢ ⟦x₂ * y₁⟧ + ⟦x₁ * y₂⟧ < ⟦x₁ * y₁⟧ + ⟦x₂ * y₂⟧ ↔ ⟦y₁ * x₂⟧ + ⟦y₂ * x₁⟧ < ⟦y₁ * x₁⟧ + ⟦y₂ * x₂⟧ | no goals |
Mathlib/SetTheory/Surreal/Multiplication.lean | [
[
"Mathlib.SetTheory.Surreal.Basic",
"Mathlib/SetTheory/Surreal/Basic.lean"
],
[
"Mathlib.Logic.Hydra",
"Mathlib/Logic/Hydra.lean"
],
[
"Init",
".lake/packages/lean4/src/lean/Init.lean"
]
] | [
{
"code": "def P1 (x₁ x₂ x₃ y₁ y₂ y₃ : PGame) :=\n ⟦x₁ * y₁⟧ + ⟦x₂ * y₂⟧ - ⟦x₁ * y₂⟧ < ⟦x₃ * y₁⟧ + ⟦x₂ * y₃⟧ - (⟦x₃ * y₃⟧ : Game)",
"end": [
74,
81
],
"full_name": "Surreal.Multiplication.P1",
"kind": "commanddeclaration",
"start": [
71,
1
]
},
{
"code": "def P2 (x₁ x₂ y : PGame) := x₁ ≈ x₂ → ⟦x₁ * y⟧ = (⟦x₂ * y⟧ : Game)",
"end": [
77,
67
],
"full_name": "Surreal.Multiplication.P2",
"kind": "commanddeclaration",
"start": [
76,
1
]
},
{
"code": "def P3 (x₁ x₂ y₁ y₂ : PGame) := ⟦x₁ * y₂⟧ + ⟦x₂ * y₁⟧ < ⟦x₁ * y₁⟧ + (⟦x₂ * y₂⟧ : Game)",
"end": [
80,
87
],
"full_name": "Surreal.Multiplication.P3",
"kind": "commanddeclaration",
"start": [
79,
1
]
},
{
"code": "def P4 (x₁ x₂ y : PGame) :=\n x₁ < x₂ → (∀ i, P3 x₁ x₂ (y.moveLeft i) y) ∧ ∀ j, P3 x₁ x₂ ((-y).moveLeft j) (-y)",
"end": [
87,
84
],
"full_name": "Surreal.Multiplication.P4",
"kind": "commanddeclaration",
"start": [
82,
1
]
},
{
"code": "def P24 (x₁ x₂ y : PGame) : Prop := P2 x₁ x₂ y ∧ P4 x₁ x₂ y",
"end": [
90,
60
],
"full_name": "Surreal.Multiplication.P24",
"kind": "commanddeclaration",
"start": [
89,
1
]
},
{
"code": "lemma P3_comm : P3 x₁ x₂ y₁ y₂ ↔ P3 y₁ y₂ x₁ x₂ := by\n rw [P3, P3, add_comm]\n congr! 2 <;> rw [quot_mul_comm]",
"end": [
98,
34
],
"full_name": "Surreal.Multiplication.P3_comm",
"kind": "lemma",
"start": [
96,
1
]
},
{
"code": "lemma P3.trans (h₁ : P3 x₁ x₂ y₁ y₂) (h₂ : P3 x₂ x₃ y₁ y₂) : P3 x₁ x₃ y₁ y₂ := by\n rw [P3] at h₁ h₂\n rw [P3, ← add_lt_add_iff_left (⟦x₂ * y₁⟧ + ⟦x₂ * y₂⟧)]\n convert add_lt_add h₁ h₂ using 1 <;> abel",
"end": [
103,
44
],
"full_name": "Surreal.Multiplication.P3.trans",
"kind": "lemma",
"start": [
100,
1
]
},
{
"code": "lemma P3_neg : P3 x₁ x₂ y₁ y₂ ↔ P3 (-x₂) (-x₁) y₁ y₂ := by\n simp_rw [P3, quot_neg_mul]\n rw [← _root_.neg_lt_neg_iff]\n abel_nf",
"end": [
108,
10
],
"full_name": "Surreal.Multiplication.P3_neg",
"kind": "lemma",
"start": [
105,
1
]
},
{
"code": "lemma P2_neg_left : P2 x₁ x₂ y ↔ P2 (-x₂) (-x₁) y := by\n rw [P2, P2]\n constructor\n · rw [quot_neg_mul, quot_neg_mul, eq_comm, neg_inj, neg_equiv_neg_iff, PGame.equiv_comm]\n exact (· ·)\n · rw [PGame.equiv_comm, neg_equiv_neg_iff, quot_neg_mul, quot_neg_mul, neg_inj, eq_comm]\n exact (· ·)",
"end": [
116,
16
],
"full_name": "Surreal.Multiplication.P2_neg_left",
"kind": "lemma",
"start": [
110,
1
]
},
{
"code": "lemma P2_neg_right : P2 x₁ x₂ y ↔ P2 x₁ x₂ (-y) := by\n rw [P2, P2, quot_mul_neg, quot_mul_neg, neg_inj]",
"end": [
119,
51
],
"full_name": "Surreal.Multiplication.P2_neg_right",
"kind": "lemma",
"start": [
118,
1
]
},
{
"code": "lemma P4_neg_left : P4 x₁ x₂ y ↔ P4 (-x₂) (-x₁) y := by\n simp_rw [P4, PGame.neg_lt_neg_iff, moveLeft_neg', ← P3_neg]",
"end": [
122,
62
],
"full_name": "Surreal.Multiplication.P4_neg_left",
"kind": "lemma",
"start": [
121,
1
]
},
{
"code": "lemma P4_neg_right : P4 x₁ x₂ y ↔ P4 x₁ x₂ (-y) := by\n rw [P4, P4, neg_neg, and_comm]",
"end": [
125,
33
],
"full_name": "Surreal.Multiplication.P4_neg_right",
"kind": "lemma",
"start": [
124,
1
]
},
{
"code": "lemma P24_neg_left : P24 x₁ x₂ y ↔ P24 (-x₂) (-x₁) y := by rw [P24, P24, P2_neg_left, P4_neg_left]",
"end": [
127,
99
],
"full_name": "Surreal.Multiplication.P24_neg_left",
"kind": "lemma",
"start": [
127,
1
]
},
{
"code": "lemma P24_neg_right : P24 x₁ x₂ y ↔ P24 x₁ x₂ (-y) := by rw [P24, P24, P2_neg_right, P4_neg_right]",
"end": [
128,
99
],
"full_name": "Surreal.Multiplication.P24_neg_right",
"kind": "lemma",
"start": [
128,
1
]
},
{
"code": "lemma mulOption_lt_iff_P1 {i j k l} :\n (⟦mulOption x y i k⟧ : Game) < -⟦mulOption x (-y) j l⟧ ↔\n P1 (x.moveLeft i) x (x.moveLeft j) y (y.moveLeft k) (-(-y).moveLeft l) := by\n dsimp only [P1, mulOption, quot_sub, quot_add]\n simp_rw [neg_sub', neg_add, quot_mul_neg, neg_neg]",
"end": [
136,
53
],
"full_name": "Surreal.Multiplication.mulOption_lt_iff_P1",
"kind": "lemma",
"start": [
132,
1
]
},
{
"code": "lemma mulOption_lt_mul_iff_P3 {i j} :\n ⟦mulOption x y i j⟧ < (⟦x * y⟧ : Game) ↔ P3 (x.moveLeft i) x (y.moveLeft j) y := by\n dsimp only [mulOption, quot_sub, quot_add]\n exact sub_lt_iff_lt_add'",
"end": [
141,
27
],
"full_name": "Surreal.Multiplication.mulOption_lt_mul_iff_P3",
"kind": "lemma",
"start": [
138,
1
]
},
{
"code": "lemma P1_of_eq (he : x₁ ≈ x₃) (h₁ : P2 x₁ x₃ y₁) (h₃ : P2 x₁ x₃ y₃) (h3 : P3 x₁ x₂ y₂ y₃) :\n P1 x₁ x₂ x₃ y₁ y₂ y₃ := by\n rw [P1, ← h₁ he, ← h₃ he, sub_lt_sub_iff]\n convert add_lt_add_left h3 ⟦x₁ * y₁⟧ using 1 <;> abel",
"end": [
146,
56
],
"full_name": "Surreal.Multiplication.P1_of_eq",
"kind": "lemma",
"start": [
143,
1
]
},
{
"code": "lemma P1_of_lt (h₁ : P3 x₃ x₂ y₂ y₃) (h₂ : P3 x₁ x₃ y₂ y₁) : P1 x₁ x₂ x₃ y₁ y₂ y₃ := by\n rw [P1, sub_lt_sub_iff, ← add_lt_add_iff_left ⟦x₃ * y₂⟧]\n convert add_lt_add h₁ h₂ using 1 <;> abel",
"end": [
150,
44
],
"full_name": "Surreal.Multiplication.P1_of_lt",
"kind": "lemma",
"start": [
148,
1
]
},
{
"code": "inductive Args : Type (u+1)\n | P1 (x y : PGame.{u}) : Args\n | P24 (x₁ x₂ y : PGame.{u}) : Args",
"end": [
155,
37
],
"full_name": "Surreal.Multiplication.Args",
"kind": "commanddeclaration",
"start": [
152,
1
]
},
{
"code": "def Args.toMultiset : Args → Multiset PGame\n | (Args.P1 x y) => {x, y}\n | (Args.P24 x₁ x₂ y) => {x₁, x₂, y}",
"end": [
160,
38
],
"full_name": "Surreal.Multiplication.Args.toMultiset",
"kind": "commanddeclaration",
"start": [
157,
1
]
},
{
"code": "def Args.Numeric (a : Args) := ∀ x ∈ a.toMultiset, SetTheory.PGame.Numeric x",
"end": [
163,
77
],
"full_name": "Surreal.Multiplication.Args.Numeric",
"kind": "commanddeclaration",
"start": [
162,
1
]
},
{
"code": "lemma Args.numeric_P1 {x y} : (Args.P1 x y).Numeric ↔ x.Numeric ∧ y.Numeric := by\n simp [Args.Numeric, Args.toMultiset]",
"end": [
166,
39
],
"full_name": "Surreal.Multiplication.Args.numeric_P1",
"kind": "lemma",
"start": [
165,
1
]
},
{
"code": "lemma Args.numeric_P24 {x₁ x₂ y} :\n (Args.P24 x₁ x₂ y).Numeric ↔ x₁.Numeric ∧ x₂.Numeric ∧ y.Numeric := by\n simp [Args.Numeric, Args.toMultiset]",
"end": [
170,
39
],
"full_name": "Surreal.Multiplication.Args.numeric_P24",
"kind": "lemma",
"start": [
168,
1
]
},
{
"code": "def ArgsRel := InvImage (TransGen <| CutExpand IsOption) Args.toMultiset",
"end": [
177,
73
],
"full_name": "Surreal.Multiplication.ArgsRel",
"kind": "commanddeclaration",
"start": [
174,
1
]
},
{
"code": "theorem argsRel_wf : WellFounded ArgsRel",
"end": [
180,
89
],
"full_name": "Surreal.Multiplication.argsRel_wf",
"kind": "commanddeclaration",
"start": [
179,
1
]
},
{
"code": "def P124 : Args → Prop\n | (Args.P1 x y) => Numeric (x * y)\n | (Args.P24 x₁ x₂ y) => P24 x₁ x₂ y",
"end": [
185,
38
],
"full_name": "Surreal.Multiplication.P124",
"kind": "commanddeclaration",
"start": [
182,
1
]
},
{
"code": "lemma ArgsRel.numeric_closed {a' a} : ArgsRel a' a → a.Numeric → a'.Numeric :=\n TransGen.closed' <| @cutExpand_closed _ IsOption ⟨wf_isOption.isIrrefl.1⟩ _ Numeric.isOption",
"end": [
189,
95
],
"full_name": "Surreal.Multiplication.ArgsRel.numeric_closed",
"kind": "lemma",
"start": [
187,
1
]
},
{
"code": "def IH1 (x y : PGame) : Prop :=\n ∀ ⦃x₁ x₂ y'⦄, IsOption x₁ x → IsOption x₂ x → (y' = y ∨ IsOption y' y) → P24 x₁ x₂ y'",
"end": [
193,
88
],
"full_name": "Surreal.Multiplication.IH1",
"kind": "commanddeclaration",
"start": [
191,
1
]
},
{
"code": "lemma ih1_neg_left : IH1 x y → IH1 (-x) y :=\n fun h x₁ x₂ y' h₁ h₂ hy ↦ by\n rw [isOption_neg] at h₁ h₂\n exact P24_neg_left.2 (h h₂ h₁ hy)",
"end": [
200,
38
],
"full_name": "Surreal.Multiplication.ih1_neg_left",
"kind": "lemma",
"start": [
197,
1
]
},
{
"code": "lemma ih1_neg_right : IH1 x y → IH1 x (-y) :=\n fun h x₁ x₂ y' ↦ by\n rw [← neg_eq_iff_eq_neg, isOption_neg, P24_neg_right]\n apply h",
"end": [
205,
12
],
"full_name": "Surreal.Multiplication.ih1_neg_right",
"kind": "lemma",
"start": [
202,
1
]
},
{
"code": "lemma numeric_option_mul (h : IsOption x' x) : (x' * y).Numeric :=\n ih (Args.P1 x' y) (TransGen.single <| cutExpand_pair_left h)",
"end": [
212,
63
],
"full_name": "Surreal.Multiplication.numeric_option_mul",
"kind": "lemma",
"start": [
211,
1
]
},
{
"code": "lemma numeric_mul_option (h : IsOption y' y) : (x * y').Numeric :=\n ih (Args.P1 x y') (TransGen.single <| cutExpand_pair_right h)",
"end": [
215,
64
],
"full_name": "Surreal.Multiplication.numeric_mul_option",
"kind": "lemma",
"start": [
214,
1
]
},
{
"code": "lemma numeric_option_mul_option (hx : IsOption x' x) (hy : IsOption y' y) : (x' * y').Numeric :=\n ih (Args.P1 x' y') ((TransGen.single <| cutExpand_pair_right hy).tail <| cutExpand_pair_left hx)",
"end": [
218,
99
],
"full_name": "Surreal.Multiplication.numeric_option_mul_option",
"kind": "lemma",
"start": [
217,
1
]
},
{
"code": "lemma ih1 : IH1 x y := by\n rintro x₁ x₂ y' h₁ h₂ (rfl|hy) <;> apply ih (Args.P24 _ _ _)\n on_goal 2 => refine TransGen.tail ?_ (cutExpand_pair_right hy)\n all_goals exact TransGen.single (cutExpand_double_left h₁ h₂)",
"end": [
223,
64
],
"full_name": "Surreal.Multiplication.ih1",
"kind": "lemma",
"start": [
220,
1
]
},
{
"code": "lemma ih1_swap : IH1 y x := ih1 <| by\n simp_rw [ArgsRel, InvImage, Args.toMultiset, Multiset.pair_comm] at ih ⊢\n exact ih",
"end": [
227,
11
],
"full_name": "Surreal.Multiplication.ih1_swap",
"kind": "lemma",
"start": [
225,
1
]
},
{
"code": "lemma P3_of_ih (hy : Numeric y) (ihyx : IH1 y x) (i k l) :\n P3 (x.moveLeft i) x (y.moveLeft k) (-(-y).moveLeft l) :=\n P3_comm.2 <| ((ihyx (IsOption.moveLeft k) (isOption_neg.1 <| .moveLeft l) <| Or.inl rfl).2\n (by rw [← moveRight_neg_symm]; apply hy.left_lt_right)).1 i",
"end": [
232,
64
],
"full_name": "Surreal.Multiplication.P3_of_ih",
"kind": "lemma",
"start": [
229,
1
]
},
{
"code": "lemma P24_of_ih (ihxy : IH1 x y) (i j) : P24 (x.moveLeft i) (x.moveLeft j) y :=\n ihxy (IsOption.moveLeft i) (IsOption.moveLeft j) (Or.inl rfl)",
"end": [
235,
64
],
"full_name": "Surreal.Multiplication.P24_of_ih",
"kind": "lemma",
"start": [
234,
1
]
},
{
"code": "lemma mulOption_lt_of_lt (i j k l) (h : x.moveLeft i < x.moveLeft j) :\n (⟦mulOption x y i k⟧ : Game) < -⟦mulOption x (-y) j l⟧ :=\n mulOption_lt_iff_P1.2 <| P1_of_lt (P3_of_ih hy ihyx j k l) <| ((P24_of_ih ihxy i j).2 h).1 k",
"end": [
245,
95
],
"full_name": "Surreal.Multiplication.mulOption_lt_of_lt",
"kind": "lemma",
"start": [
243,
1
]
},
{
"code": "lemma mulOption_lt (i j k l) : (⟦mulOption x y i k⟧ : Game) < -⟦mulOption x (-y) j l⟧ := by\n obtain (h|h|h) := lt_or_equiv_or_gt (hx.moveLeft i) (hx.moveLeft j)\n · exact mulOption_lt_of_lt hy ihxy ihyx i j k l h\n · have ml := @IsOption.moveLeft\n exact mulOption_lt_iff_P1.2 (P1_of_eq h (P24_of_ih ihxy i j).1\n (ihxy (ml i) (ml j) <| Or.inr <| isOption_neg.1 <| ml l).1 <| P3_of_ih hy ihyx i k l)\n · rw [mulOption_neg_neg, lt_neg]\n exact mulOption_lt_of_lt hy.neg (ih1_neg_right ihxy) (ih1_neg_left ihyx) j i l _ h",
"end": [
254,
87
],
"full_name": "Surreal.Multiplication.mulOption_lt",
"kind": "lemma",
"start": [
247,
1
]
},
{
"code": "theorem P1_of_ih : (x * y).Numeric",
"end": [
281,
56
],
"full_name": "Surreal.Multiplication.P1_of_ih",
"kind": "commanddeclaration",
"start": [
258,
1
]
},
{
"code": "def IH24 (x₁ x₂ y : PGame) : Prop :=\n ∀ ⦃z⦄, (IsOption z x₁ → P24 z x₂ y) ∧ (IsOption z x₂ → P24 x₁ z y) ∧ (IsOption z y → P24 x₁ x₂ z)",
"end": [
285,
100
],
"full_name": "Surreal.Multiplication.IH24",
"kind": "commanddeclaration",
"start": [
283,
1
]
},
{
"code": "def IH4 (x₁ x₂ y : PGame) : Prop :=\n ∀ ⦃z w⦄, IsOption w y → (IsOption z x₁ → P2 z x₂ w) ∧ (IsOption z x₂ → P2 x₁ z w)",
"end": [
289,
84
],
"full_name": "Surreal.Multiplication.IH4",
"kind": "commanddeclaration",
"start": [
287,
1
]
},
{
"code": "lemma ih₁₂ : IH24 x₁ x₂ y := by\n rw [IH24]\n refine fun z ↦ ⟨?_, ?_, ?_⟩ <;>\n refine fun h ↦ ih' (Args.P24 _ _ _) (TransGen.single ?_)\n · exact (cutExpand_add_right {y}).2 (cutExpand_pair_left h)\n · exact (cutExpand_add_left {x₁}).2 (cutExpand_pair_left h)\n · exact (cutExpand_add_left {x₁}).2 (cutExpand_pair_right h)",
"end": [
301,
63
],
"full_name": "Surreal.Multiplication.ih₁₂",
"kind": "lemma",
"start": [
295,
1
]
},
{
"code": "lemma ih₂₁ : IH24 x₂ x₁ y := ih₁₂ <| by\n simp_rw [ArgsRel, InvImage, Args.toMultiset, Multiset.pair_comm] at ih' ⊢\n suffices {x₁, y, x₂} = {x₂, y, x₁} by rwa [← this]\n dsimp only [Multiset.insert_eq_cons, ← Multiset.singleton_add] at ih' ⊢\n abel",
"end": [
307,
7
],
"full_name": "Surreal.Multiplication.ih₂₁",
"kind": "lemma",
"start": [
303,
1
]
},
{
"code": "lemma ih4 : IH4 x₁ x₂ y := by\n refine fun z w h ↦ ⟨?_, ?_⟩\n all_goals\n intro h'\n apply (ih' (Args.P24 _ _ _) <| (TransGen.single _).tail <|\n (cutExpand_add_left {x₁}).2 <| cutExpand_pair_right h).1\n try exact (cutExpand_add_right {w}).2 <| cutExpand_pair_left h'\n try exact (cutExpand_add_right {w}).2 <| cutExpand_pair_right h'",
"end": [
316,
69
],
"full_name": "Surreal.Multiplication.ih4",
"kind": "lemma",
"start": [
309,
1
]
},
{
"code": "lemma numeric_of_ih : (x₁ * y).Numeric ∧ (x₂ * y).Numeric := by\n constructor <;> refine ih' (Args.P1 _ _) (TransGen.single ?_)\n · exact (cutExpand_add_right {y}).2 <| (cutExpand_add_left {x₁}).2 cutExpand_zero\n · exact (cutExpand_add_right {x₂, y}).2 cutExpand_zero",
"end": [
321,
57
],
"full_name": "Surreal.Multiplication.numeric_of_ih",
"kind": "lemma",
"start": [
318,
1
]
},
{
"code": "lemma ih24_neg : IH24 x₁ x₂ y → IH24 (-x₂) (-x₁) y ∧ IH24 x₁ x₂ (-y) := by\n simp_rw [IH24, ← P24_neg_right, isOption_neg]\n refine fun h ↦ ⟨fun z ↦ ⟨?_, ?_, ?_⟩,\n fun z ↦ ⟨(@h z).1, (@h z).2.1, P24_neg_right.2 ∘ (@h <| -z).2.2⟩⟩\n all_goals\n rw [P24_neg_left]\n simp only [neg_neg]\n first | exact (@h <| -z).2.1 | exact (@h <| -z).1 | exact (@h z).2.2",
"end": [
331,
73
],
"full_name": "Surreal.Multiplication.ih24_neg",
"kind": "lemma",
"start": [
323,
1
]
},
{
"code": "lemma ih4_neg : IH4 x₁ x₂ y → IH4 (-x₂) (-x₁) y ∧ IH4 x₁ x₂ (-y) := by\n simp_rw [IH4, isOption_neg]\n refine fun h ↦ ⟨fun z w h' ↦ ?_, fun z w h' ↦ ?_⟩\n · convert (h h').symm using 2 <;> rw [P2_neg_left, neg_neg]\n · convert h h' using 2 <;> rw [P2_neg_right]",
"end": [
338,
47
],
"full_name": "Surreal.Multiplication.ih4_neg",
"kind": "lemma",
"start": [
333,
1
]
},
{
"code": "lemma mulOption_lt_mul_of_equiv (hn : x₁.Numeric) (h : IH24 x₁ x₂ y) (he : x₁ ≈ x₂) (i j) :\n ⟦mulOption x₁ y i j⟧ < (⟦x₂ * y⟧ : Game) := by\n convert sub_lt_iff_lt_add'.2 ((((@h _).1 <| IsOption.moveLeft i).2 _).1 j) using 1\n · rw [← ((@h _).2.2 <| IsOption.moveLeft j).1 he]\n rfl\n · rw [← lt_congr_right he]\n apply hn.moveLeft_lt",
"end": [
346,
25
],
"full_name": "Surreal.Multiplication.mulOption_lt_mul_of_equiv",
"kind": "lemma",
"start": [
340,
1
]
},
{
"code": "theorem mul_right_le_of_equiv (h₁ : x₁.Numeric) (h₂ : x₂.Numeric)\n (h₁₂ : IH24 x₁ x₂ y) (h₂₁ : IH24 x₂ x₁ y) (he : x₁ ≈ x₂) : x₁ * y ≤ x₂ * y",
"end": [
362,
73
],
"full_name": "Surreal.Multiplication.mul_right_le_of_equiv",
"kind": "commanddeclaration",
"start": [
348,
1
]
},
{
"code": "def MulOptionsLTMul (x y : PGame) : Prop := ∀ ⦃i j⦄, ⟦mulOption x y i j⟧ < (⟦x * y⟧ : Game)",
"end": [
365,
92
],
"full_name": "Surreal.Multiplication.MulOptionsLTMul",
"kind": "commanddeclaration",
"start": [
364,
1
]
},
{
"code": "lemma mulOptionsLTMul_of_numeric (hn : (x * y).Numeric) :\n (MulOptionsLTMul x y ∧ MulOptionsLTMul (-x) (-y)) ∧\n (MulOptionsLTMul x (-y) ∧ MulOptionsLTMul (-x) y) := by\n constructor\n · have h := hn.moveLeft_lt\n simp_rw [lt_iff_game_lt] at h\n convert (leftMoves_mul_iff <| GT.gt _).1 h\n rw [← quot_neg_mul_neg]\n rfl\n · have h := hn.lt_moveRight\n simp_rw [lt_iff_game_lt, rightMoves_mul_iff] at h\n refine h.imp ?_ ?_ <;> refine forall₂_imp fun a b ↦ ?_\n all_goals\n rw [lt_neg]\n first | rw [quot_mul_neg] | rw [quot_neg_mul]\n exact id",
"end": [
386,
15
],
"full_name": "Surreal.Multiplication.mulOptionsLTMul_of_numeric",
"kind": "lemma",
"start": [
367,
1
]
},
{
"code": "def IH3 (x₁ x' x₂ y₁ y₂ : PGame) : Prop :=\n P2 x₁ x' y₁ ∧ P2 x₁ x' y₂ ∧ P3 x' x₂ y₁ y₂ ∧ (x₁ < x' → P3 x₁ x' y₁ y₂)",
"end": [
395,
76
],
"full_name": "Surreal.Multiplication.IH3",
"kind": "commanddeclaration",
"start": [
388,
1
]
},
{
"code": "lemma ih3_of_ih (h24 : IH24 x₁ x₂ y) (h4 : IH4 x₁ x₂ y) (hl : MulOptionsLTMul x₂ y) (i j) :\n IH3 x₁ (x₂.moveLeft i) x₂ (y.moveLeft j) y :=\n have ml := @IsOption.moveLeft\n have h24 := (@h24 _).2.1 (ml i)\n ⟨(h4 <| ml j).2 (ml i), h24.1, mulOption_lt_mul_iff_P3.1 (@hl i j), fun l ↦ (h24.2 l).1 _⟩",
"end": [
401,
93
],
"full_name": "Surreal.Multiplication.ih3_of_ih",
"kind": "lemma",
"start": [
397,
1
]
},
{
"code": "lemma P3_of_le_left {y₁ y₂} (i) (h : IH3 x₁ (x₂.moveLeft i) x₂ y₁ y₂) (hl : x₁ ≤ x₂.moveLeft i) :\n P3 x₁ x₂ y₁ y₂ := by\n obtain (hl|he) := lt_or_equiv_of_le hl\n · exact (h.2.2.2 hl).trans h.2.2.1\n · rw [P3, h.1 he, h.2.1 he]\n exact h.2.2.1",
"end": [
408,
18
],
"full_name": "Surreal.Multiplication.P3_of_le_left",
"kind": "lemma",
"start": [
403,
1
]
},
{
"code": "theorem P3_of_lt {y₁ y₂} (h : ∀ i, IH3 x₁ (x₂.moveLeft i) x₂ y₁ y₂)\n (hs : ∀ i, IH3 (-x₂) ((-x₁).moveLeft i) (-x₁) y₁ y₂) (hl : x₁ < x₂) :\n P3 x₁ x₂ y₁ y₂",
"end": [
419,
45
],
"full_name": "Surreal.Multiplication.P3_of_lt",
"kind": "commanddeclaration",
"start": [
410,
1
]
},
{
"code": "theorem main (a : Args) : a.Numeric → P124 a",
"end": [
448,
50
],
"full_name": "Surreal.Multiplication.main",
"kind": "commanddeclaration",
"start": [
421,
1
]
},
{
"code": "theorem Numeric.mul : Numeric (x * y)",
"end": [
459,
80
],
"full_name": "SetTheory.PGame.Numeric.mul",
"kind": "commanddeclaration",
"start": [
459,
1
]
},
{
"code": "theorem P24 : P24 x₁ x₂ y",
"end": [
461,
75
],
"full_name": "SetTheory.PGame.P24",
"kind": "commanddeclaration",
"start": [
461,
1
]
},
{
"code": "theorem Equiv.mul_congr_left (he : x₁ ≈ x₂) : x₁ * y ≈ x₂ * y",
"end": [
464,
47
],
"full_name": "SetTheory.PGame.Equiv.mul_congr_left",
"kind": "commanddeclaration",
"start": [
463,
1
]
},
{
"code": "theorem Equiv.mul_congr_right (he : y₁ ≈ y₂) : x * y₁ ≈ x * y₂",
"end": [
467,
92
],
"full_name": "SetTheory.PGame.Equiv.mul_congr_right",
"kind": "commanddeclaration",
"start": [
466,
1
]
},
{
"code": "theorem Equiv.mul_congr (hx : x₁ ≈ x₂) (hy : y₁ ≈ y₂) : x₁ * y₁ ≈ x₂ * y₂",
"end": [
470,
74
],
"full_name": "SetTheory.PGame.Equiv.mul_congr",
"kind": "commanddeclaration",
"start": [
469,
1
]
},
{
"code": "theorem P3_of_lt_of_lt (hx : x₁ < x₂) (hy : y₁ < y₂) : P3 x₁ x₂ y₁ y₂",
"end": [
489,
72
],
"full_name": "SetTheory.PGame.P3_of_lt_of_lt",
"kind": "commanddeclaration",
"start": [
474,
1
]
},
{
"code": "theorem Numeric.mul_pos (hp₁ : 0 < x₁) (hp₂ : 0 < x₂) : 0 < x₁ * x₂",
"end": [
495,
13
],
"full_name": "SetTheory.PGame.Numeric.mul_pos",
"kind": "commanddeclaration",
"start": [
491,
1
]
}
] | 1 | Surreal.Multiplication.P3.trans | [
[
100,
80
],
[
103,
44
]
] | 0 | 3 | rw [P3] at h₁ h₂ | x x₁ x₂ x₃ x' y y₁ y₂ y₃ y' : PGame
h₁ : P3 x₁ x₂ y₁ y₂
h₂ : P3 x₂ x₃ y₁ y₂
⊢ P3 x₁ x₃ y₁ y₂ | x x₁ x₂ x₃ x' y y₁ y₂ y₃ y' : PGame
h₁ : ⟦x₁ * y₂⟧ + ⟦x₂ * y₁⟧ < ⟦x₁ * y₁⟧ + ⟦x₂ * y₂⟧
h₂ : ⟦x₂ * y₂⟧ + ⟦x₃ * y₁⟧ < ⟦x₂ * y₁⟧ + ⟦x₃ * y₂⟧
⊢ P3 x₁ x₃ y₁ y₂ |
Mathlib/SetTheory/Surreal/Multiplication.lean | [
[
"Mathlib.SetTheory.Surreal.Basic",
"Mathlib/SetTheory/Surreal/Basic.lean"
],
[
"Mathlib.Logic.Hydra",
"Mathlib/Logic/Hydra.lean"
],
[
"Init",
".lake/packages/lean4/src/lean/Init.lean"
]
] | [
{
"code": "def P1 (x₁ x₂ x₃ y₁ y₂ y₃ : PGame) :=\n ⟦x₁ * y₁⟧ + ⟦x₂ * y₂⟧ - ⟦x₁ * y₂⟧ < ⟦x₃ * y₁⟧ + ⟦x₂ * y₃⟧ - (⟦x₃ * y₃⟧ : Game)",
"end": [
74,
81
],
"full_name": "Surreal.Multiplication.P1",
"kind": "commanddeclaration",
"start": [
71,
1
]
},
{
"code": "def P2 (x₁ x₂ y : PGame) := x₁ ≈ x₂ → ⟦x₁ * y⟧ = (⟦x₂ * y⟧ : Game)",
"end": [
77,
67
],
"full_name": "Surreal.Multiplication.P2",
"kind": "commanddeclaration",
"start": [
76,
1
]
},
{
"code": "def P3 (x₁ x₂ y₁ y₂ : PGame) := ⟦x₁ * y₂⟧ + ⟦x₂ * y₁⟧ < ⟦x₁ * y₁⟧ + (⟦x₂ * y₂⟧ : Game)",
"end": [
80,
87
],
"full_name": "Surreal.Multiplication.P3",
"kind": "commanddeclaration",
"start": [
79,
1
]
},
{
"code": "def P4 (x₁ x₂ y : PGame) :=\n x₁ < x₂ → (∀ i, P3 x₁ x₂ (y.moveLeft i) y) ∧ ∀ j, P3 x₁ x₂ ((-y).moveLeft j) (-y)",
"end": [
87,
84
],
"full_name": "Surreal.Multiplication.P4",
"kind": "commanddeclaration",
"start": [
82,
1
]
},
{
"code": "def P24 (x₁ x₂ y : PGame) : Prop := P2 x₁ x₂ y ∧ P4 x₁ x₂ y",
"end": [
90,
60
],
"full_name": "Surreal.Multiplication.P24",
"kind": "commanddeclaration",
"start": [
89,
1
]
},
{
"code": "lemma P3_comm : P3 x₁ x₂ y₁ y₂ ↔ P3 y₁ y₂ x₁ x₂ := by\n rw [P3, P3, add_comm]\n congr! 2 <;> rw [quot_mul_comm]",
"end": [
98,
34
],
"full_name": "Surreal.Multiplication.P3_comm",
"kind": "lemma",
"start": [
96,
1
]
},
{
"code": "lemma P3.trans (h₁ : P3 x₁ x₂ y₁ y₂) (h₂ : P3 x₂ x₃ y₁ y₂) : P3 x₁ x₃ y₁ y₂ := by\n rw [P3] at h₁ h₂\n rw [P3, ← add_lt_add_iff_left (⟦x₂ * y₁⟧ + ⟦x₂ * y₂⟧)]\n convert add_lt_add h₁ h₂ using 1 <;> abel",
"end": [
103,
44
],
"full_name": "Surreal.Multiplication.P3.trans",
"kind": "lemma",
"start": [
100,
1
]
},
{
"code": "lemma P3_neg : P3 x₁ x₂ y₁ y₂ ↔ P3 (-x₂) (-x₁) y₁ y₂ := by\n simp_rw [P3, quot_neg_mul]\n rw [← _root_.neg_lt_neg_iff]\n abel_nf",
"end": [
108,
10
],
"full_name": "Surreal.Multiplication.P3_neg",
"kind": "lemma",
"start": [
105,
1
]
},
{
"code": "lemma P2_neg_left : P2 x₁ x₂ y ↔ P2 (-x₂) (-x₁) y := by\n rw [P2, P2]\n constructor\n · rw [quot_neg_mul, quot_neg_mul, eq_comm, neg_inj, neg_equiv_neg_iff, PGame.equiv_comm]\n exact (· ·)\n · rw [PGame.equiv_comm, neg_equiv_neg_iff, quot_neg_mul, quot_neg_mul, neg_inj, eq_comm]\n exact (· ·)",
"end": [
116,
16
],
"full_name": "Surreal.Multiplication.P2_neg_left",
"kind": "lemma",
"start": [
110,
1
]
},
{
"code": "lemma P2_neg_right : P2 x₁ x₂ y ↔ P2 x₁ x₂ (-y) := by\n rw [P2, P2, quot_mul_neg, quot_mul_neg, neg_inj]",
"end": [
119,
51
],
"full_name": "Surreal.Multiplication.P2_neg_right",
"kind": "lemma",
"start": [
118,
1
]
},
{
"code": "lemma P4_neg_left : P4 x₁ x₂ y ↔ P4 (-x₂) (-x₁) y := by\n simp_rw [P4, PGame.neg_lt_neg_iff, moveLeft_neg', ← P3_neg]",
"end": [
122,
62
],
"full_name": "Surreal.Multiplication.P4_neg_left",
"kind": "lemma",
"start": [
121,
1
]
},
{
"code": "lemma P4_neg_right : P4 x₁ x₂ y ↔ P4 x₁ x₂ (-y) := by\n rw [P4, P4, neg_neg, and_comm]",
"end": [
125,
33
],
"full_name": "Surreal.Multiplication.P4_neg_right",
"kind": "lemma",
"start": [
124,
1
]
},
{
"code": "lemma P24_neg_left : P24 x₁ x₂ y ↔ P24 (-x₂) (-x₁) y := by rw [P24, P24, P2_neg_left, P4_neg_left]",
"end": [
127,
99
],
"full_name": "Surreal.Multiplication.P24_neg_left",
"kind": "lemma",
"start": [
127,
1
]
},
{
"code": "lemma P24_neg_right : P24 x₁ x₂ y ↔ P24 x₁ x₂ (-y) := by rw [P24, P24, P2_neg_right, P4_neg_right]",
"end": [
128,
99
],
"full_name": "Surreal.Multiplication.P24_neg_right",
"kind": "lemma",
"start": [
128,
1
]
},
{
"code": "lemma mulOption_lt_iff_P1 {i j k l} :\n (⟦mulOption x y i k⟧ : Game) < -⟦mulOption x (-y) j l⟧ ↔\n P1 (x.moveLeft i) x (x.moveLeft j) y (y.moveLeft k) (-(-y).moveLeft l) := by\n dsimp only [P1, mulOption, quot_sub, quot_add]\n simp_rw [neg_sub', neg_add, quot_mul_neg, neg_neg]",
"end": [
136,
53
],
"full_name": "Surreal.Multiplication.mulOption_lt_iff_P1",
"kind": "lemma",
"start": [
132,
1
]
},
{
"code": "lemma mulOption_lt_mul_iff_P3 {i j} :\n ⟦mulOption x y i j⟧ < (⟦x * y⟧ : Game) ↔ P3 (x.moveLeft i) x (y.moveLeft j) y := by\n dsimp only [mulOption, quot_sub, quot_add]\n exact sub_lt_iff_lt_add'",
"end": [
141,
27
],
"full_name": "Surreal.Multiplication.mulOption_lt_mul_iff_P3",
"kind": "lemma",
"start": [
138,
1
]
},
{
"code": "lemma P1_of_eq (he : x₁ ≈ x₃) (h₁ : P2 x₁ x₃ y₁) (h₃ : P2 x₁ x₃ y₃) (h3 : P3 x₁ x₂ y₂ y₃) :\n P1 x₁ x₂ x₃ y₁ y₂ y₃ := by\n rw [P1, ← h₁ he, ← h₃ he, sub_lt_sub_iff]\n convert add_lt_add_left h3 ⟦x₁ * y₁⟧ using 1 <;> abel",
"end": [
146,
56
],
"full_name": "Surreal.Multiplication.P1_of_eq",
"kind": "lemma",
"start": [
143,
1
]
},
{
"code": "lemma P1_of_lt (h₁ : P3 x₃ x₂ y₂ y₃) (h₂ : P3 x₁ x₃ y₂ y₁) : P1 x₁ x₂ x₃ y₁ y₂ y₃ := by\n rw [P1, sub_lt_sub_iff, ← add_lt_add_iff_left ⟦x₃ * y₂⟧]\n convert add_lt_add h₁ h₂ using 1 <;> abel",
"end": [
150,
44
],
"full_name": "Surreal.Multiplication.P1_of_lt",
"kind": "lemma",
"start": [
148,
1
]
},
{
"code": "inductive Args : Type (u+1)\n | P1 (x y : PGame.{u}) : Args\n | P24 (x₁ x₂ y : PGame.{u}) : Args",
"end": [
155,
37
],
"full_name": "Surreal.Multiplication.Args",
"kind": "commanddeclaration",
"start": [
152,
1
]
},
{
"code": "def Args.toMultiset : Args → Multiset PGame\n | (Args.P1 x y) => {x, y}\n | (Args.P24 x₁ x₂ y) => {x₁, x₂, y}",
"end": [
160,
38
],
"full_name": "Surreal.Multiplication.Args.toMultiset",
"kind": "commanddeclaration",
"start": [
157,
1
]
},
{
"code": "def Args.Numeric (a : Args) := ∀ x ∈ a.toMultiset, SetTheory.PGame.Numeric x",
"end": [
163,
77
],
"full_name": "Surreal.Multiplication.Args.Numeric",
"kind": "commanddeclaration",
"start": [
162,
1
]
},
{
"code": "lemma Args.numeric_P1 {x y} : (Args.P1 x y).Numeric ↔ x.Numeric ∧ y.Numeric := by\n simp [Args.Numeric, Args.toMultiset]",
"end": [
166,
39
],
"full_name": "Surreal.Multiplication.Args.numeric_P1",
"kind": "lemma",
"start": [
165,
1
]
},
{
"code": "lemma Args.numeric_P24 {x₁ x₂ y} :\n (Args.P24 x₁ x₂ y).Numeric ↔ x₁.Numeric ∧ x₂.Numeric ∧ y.Numeric := by\n simp [Args.Numeric, Args.toMultiset]",
"end": [
170,
39
],
"full_name": "Surreal.Multiplication.Args.numeric_P24",
"kind": "lemma",
"start": [
168,
1
]
},
{
"code": "def ArgsRel := InvImage (TransGen <| CutExpand IsOption) Args.toMultiset",
"end": [
177,
73
],
"full_name": "Surreal.Multiplication.ArgsRel",
"kind": "commanddeclaration",
"start": [
174,
1
]
},
{
"code": "theorem argsRel_wf : WellFounded ArgsRel",
"end": [
180,
89
],
"full_name": "Surreal.Multiplication.argsRel_wf",
"kind": "commanddeclaration",
"start": [
179,
1
]
},
{
"code": "def P124 : Args → Prop\n | (Args.P1 x y) => Numeric (x * y)\n | (Args.P24 x₁ x₂ y) => P24 x₁ x₂ y",
"end": [
185,
38
],
"full_name": "Surreal.Multiplication.P124",
"kind": "commanddeclaration",
"start": [
182,
1
]
},
{
"code": "lemma ArgsRel.numeric_closed {a' a} : ArgsRel a' a → a.Numeric → a'.Numeric :=\n TransGen.closed' <| @cutExpand_closed _ IsOption ⟨wf_isOption.isIrrefl.1⟩ _ Numeric.isOption",
"end": [
189,
95
],
"full_name": "Surreal.Multiplication.ArgsRel.numeric_closed",
"kind": "lemma",
"start": [
187,
1
]
},
{
"code": "def IH1 (x y : PGame) : Prop :=\n ∀ ⦃x₁ x₂ y'⦄, IsOption x₁ x → IsOption x₂ x → (y' = y ∨ IsOption y' y) → P24 x₁ x₂ y'",
"end": [
193,
88
],
"full_name": "Surreal.Multiplication.IH1",
"kind": "commanddeclaration",
"start": [
191,
1
]
},
{
"code": "lemma ih1_neg_left : IH1 x y → IH1 (-x) y :=\n fun h x₁ x₂ y' h₁ h₂ hy ↦ by\n rw [isOption_neg] at h₁ h₂\n exact P24_neg_left.2 (h h₂ h₁ hy)",
"end": [
200,
38
],
"full_name": "Surreal.Multiplication.ih1_neg_left",
"kind": "lemma",
"start": [
197,
1
]
},
{
"code": "lemma ih1_neg_right : IH1 x y → IH1 x (-y) :=\n fun h x₁ x₂ y' ↦ by\n rw [← neg_eq_iff_eq_neg, isOption_neg, P24_neg_right]\n apply h",
"end": [
205,
12
],
"full_name": "Surreal.Multiplication.ih1_neg_right",
"kind": "lemma",
"start": [
202,
1
]
},
{
"code": "lemma numeric_option_mul (h : IsOption x' x) : (x' * y).Numeric :=\n ih (Args.P1 x' y) (TransGen.single <| cutExpand_pair_left h)",
"end": [
212,
63
],
"full_name": "Surreal.Multiplication.numeric_option_mul",
"kind": "lemma",
"start": [
211,
1
]
},
{
"code": "lemma numeric_mul_option (h : IsOption y' y) : (x * y').Numeric :=\n ih (Args.P1 x y') (TransGen.single <| cutExpand_pair_right h)",
"end": [
215,
64
],
"full_name": "Surreal.Multiplication.numeric_mul_option",
"kind": "lemma",
"start": [
214,
1
]
},
{
"code": "lemma numeric_option_mul_option (hx : IsOption x' x) (hy : IsOption y' y) : (x' * y').Numeric :=\n ih (Args.P1 x' y') ((TransGen.single <| cutExpand_pair_right hy).tail <| cutExpand_pair_left hx)",
"end": [
218,
99
],
"full_name": "Surreal.Multiplication.numeric_option_mul_option",
"kind": "lemma",
"start": [
217,
1
]
},
{
"code": "lemma ih1 : IH1 x y := by\n rintro x₁ x₂ y' h₁ h₂ (rfl|hy) <;> apply ih (Args.P24 _ _ _)\n on_goal 2 => refine TransGen.tail ?_ (cutExpand_pair_right hy)\n all_goals exact TransGen.single (cutExpand_double_left h₁ h₂)",
"end": [
223,
64
],
"full_name": "Surreal.Multiplication.ih1",
"kind": "lemma",
"start": [
220,
1
]
},
{
"code": "lemma ih1_swap : IH1 y x := ih1 <| by\n simp_rw [ArgsRel, InvImage, Args.toMultiset, Multiset.pair_comm] at ih ⊢\n exact ih",
"end": [
227,
11
],
"full_name": "Surreal.Multiplication.ih1_swap",
"kind": "lemma",
"start": [
225,
1
]
},
{
"code": "lemma P3_of_ih (hy : Numeric y) (ihyx : IH1 y x) (i k l) :\n P3 (x.moveLeft i) x (y.moveLeft k) (-(-y).moveLeft l) :=\n P3_comm.2 <| ((ihyx (IsOption.moveLeft k) (isOption_neg.1 <| .moveLeft l) <| Or.inl rfl).2\n (by rw [← moveRight_neg_symm]; apply hy.left_lt_right)).1 i",
"end": [
232,
64
],
"full_name": "Surreal.Multiplication.P3_of_ih",
"kind": "lemma",
"start": [
229,
1
]
},
{
"code": "lemma P24_of_ih (ihxy : IH1 x y) (i j) : P24 (x.moveLeft i) (x.moveLeft j) y :=\n ihxy (IsOption.moveLeft i) (IsOption.moveLeft j) (Or.inl rfl)",
"end": [
235,
64
],
"full_name": "Surreal.Multiplication.P24_of_ih",
"kind": "lemma",
"start": [
234,
1
]
},
{
"code": "lemma mulOption_lt_of_lt (i j k l) (h : x.moveLeft i < x.moveLeft j) :\n (⟦mulOption x y i k⟧ : Game) < -⟦mulOption x (-y) j l⟧ :=\n mulOption_lt_iff_P1.2 <| P1_of_lt (P3_of_ih hy ihyx j k l) <| ((P24_of_ih ihxy i j).2 h).1 k",
"end": [
245,
95
],
"full_name": "Surreal.Multiplication.mulOption_lt_of_lt",
"kind": "lemma",
"start": [
243,
1
]
},
{
"code": "lemma mulOption_lt (i j k l) : (⟦mulOption x y i k⟧ : Game) < -⟦mulOption x (-y) j l⟧ := by\n obtain (h|h|h) := lt_or_equiv_or_gt (hx.moveLeft i) (hx.moveLeft j)\n · exact mulOption_lt_of_lt hy ihxy ihyx i j k l h\n · have ml := @IsOption.moveLeft\n exact mulOption_lt_iff_P1.2 (P1_of_eq h (P24_of_ih ihxy i j).1\n (ihxy (ml i) (ml j) <| Or.inr <| isOption_neg.1 <| ml l).1 <| P3_of_ih hy ihyx i k l)\n · rw [mulOption_neg_neg, lt_neg]\n exact mulOption_lt_of_lt hy.neg (ih1_neg_right ihxy) (ih1_neg_left ihyx) j i l _ h",
"end": [
254,
87
],
"full_name": "Surreal.Multiplication.mulOption_lt",
"kind": "lemma",
"start": [
247,
1
]
},
{
"code": "theorem P1_of_ih : (x * y).Numeric",
"end": [
281,
56
],
"full_name": "Surreal.Multiplication.P1_of_ih",
"kind": "commanddeclaration",
"start": [
258,
1
]
},
{
"code": "def IH24 (x₁ x₂ y : PGame) : Prop :=\n ∀ ⦃z⦄, (IsOption z x₁ → P24 z x₂ y) ∧ (IsOption z x₂ → P24 x₁ z y) ∧ (IsOption z y → P24 x₁ x₂ z)",
"end": [
285,
100
],
"full_name": "Surreal.Multiplication.IH24",
"kind": "commanddeclaration",
"start": [
283,
1
]
},
{
"code": "def IH4 (x₁ x₂ y : PGame) : Prop :=\n ∀ ⦃z w⦄, IsOption w y → (IsOption z x₁ → P2 z x₂ w) ∧ (IsOption z x₂ → P2 x₁ z w)",
"end": [
289,
84
],
"full_name": "Surreal.Multiplication.IH4",
"kind": "commanddeclaration",
"start": [
287,
1
]
},
{
"code": "lemma ih₁₂ : IH24 x₁ x₂ y := by\n rw [IH24]\n refine fun z ↦ ⟨?_, ?_, ?_⟩ <;>\n refine fun h ↦ ih' (Args.P24 _ _ _) (TransGen.single ?_)\n · exact (cutExpand_add_right {y}).2 (cutExpand_pair_left h)\n · exact (cutExpand_add_left {x₁}).2 (cutExpand_pair_left h)\n · exact (cutExpand_add_left {x₁}).2 (cutExpand_pair_right h)",
"end": [
301,
63
],
"full_name": "Surreal.Multiplication.ih₁₂",
"kind": "lemma",
"start": [
295,
1
]
},
{
"code": "lemma ih₂₁ : IH24 x₂ x₁ y := ih₁₂ <| by\n simp_rw [ArgsRel, InvImage, Args.toMultiset, Multiset.pair_comm] at ih' ⊢\n suffices {x₁, y, x₂} = {x₂, y, x₁} by rwa [← this]\n dsimp only [Multiset.insert_eq_cons, ← Multiset.singleton_add] at ih' ⊢\n abel",
"end": [
307,
7
],
"full_name": "Surreal.Multiplication.ih₂₁",
"kind": "lemma",
"start": [
303,
1
]
},
{
"code": "lemma ih4 : IH4 x₁ x₂ y := by\n refine fun z w h ↦ ⟨?_, ?_⟩\n all_goals\n intro h'\n apply (ih' (Args.P24 _ _ _) <| (TransGen.single _).tail <|\n (cutExpand_add_left {x₁}).2 <| cutExpand_pair_right h).1\n try exact (cutExpand_add_right {w}).2 <| cutExpand_pair_left h'\n try exact (cutExpand_add_right {w}).2 <| cutExpand_pair_right h'",
"end": [
316,
69
],
"full_name": "Surreal.Multiplication.ih4",
"kind": "lemma",
"start": [
309,
1
]
},
{
"code": "lemma numeric_of_ih : (x₁ * y).Numeric ∧ (x₂ * y).Numeric := by\n constructor <;> refine ih' (Args.P1 _ _) (TransGen.single ?_)\n · exact (cutExpand_add_right {y}).2 <| (cutExpand_add_left {x₁}).2 cutExpand_zero\n · exact (cutExpand_add_right {x₂, y}).2 cutExpand_zero",
"end": [
321,
57
],
"full_name": "Surreal.Multiplication.numeric_of_ih",
"kind": "lemma",
"start": [
318,
1
]
},
{
"code": "lemma ih24_neg : IH24 x₁ x₂ y → IH24 (-x₂) (-x₁) y ∧ IH24 x₁ x₂ (-y) := by\n simp_rw [IH24, ← P24_neg_right, isOption_neg]\n refine fun h ↦ ⟨fun z ↦ ⟨?_, ?_, ?_⟩,\n fun z ↦ ⟨(@h z).1, (@h z).2.1, P24_neg_right.2 ∘ (@h <| -z).2.2⟩⟩\n all_goals\n rw [P24_neg_left]\n simp only [neg_neg]\n first | exact (@h <| -z).2.1 | exact (@h <| -z).1 | exact (@h z).2.2",
"end": [
331,
73
],
"full_name": "Surreal.Multiplication.ih24_neg",
"kind": "lemma",
"start": [
323,
1
]
},
{
"code": "lemma ih4_neg : IH4 x₁ x₂ y → IH4 (-x₂) (-x₁) y ∧ IH4 x₁ x₂ (-y) := by\n simp_rw [IH4, isOption_neg]\n refine fun h ↦ ⟨fun z w h' ↦ ?_, fun z w h' ↦ ?_⟩\n · convert (h h').symm using 2 <;> rw [P2_neg_left, neg_neg]\n · convert h h' using 2 <;> rw [P2_neg_right]",
"end": [
338,
47
],
"full_name": "Surreal.Multiplication.ih4_neg",
"kind": "lemma",
"start": [
333,
1
]
},
{
"code": "lemma mulOption_lt_mul_of_equiv (hn : x₁.Numeric) (h : IH24 x₁ x₂ y) (he : x₁ ≈ x₂) (i j) :\n ⟦mulOption x₁ y i j⟧ < (⟦x₂ * y⟧ : Game) := by\n convert sub_lt_iff_lt_add'.2 ((((@h _).1 <| IsOption.moveLeft i).2 _).1 j) using 1\n · rw [← ((@h _).2.2 <| IsOption.moveLeft j).1 he]\n rfl\n · rw [← lt_congr_right he]\n apply hn.moveLeft_lt",
"end": [
346,
25
],
"full_name": "Surreal.Multiplication.mulOption_lt_mul_of_equiv",
"kind": "lemma",
"start": [
340,
1
]
},
{
"code": "theorem mul_right_le_of_equiv (h₁ : x₁.Numeric) (h₂ : x₂.Numeric)\n (h₁₂ : IH24 x₁ x₂ y) (h₂₁ : IH24 x₂ x₁ y) (he : x₁ ≈ x₂) : x₁ * y ≤ x₂ * y",
"end": [
362,
73
],
"full_name": "Surreal.Multiplication.mul_right_le_of_equiv",
"kind": "commanddeclaration",
"start": [
348,
1
]
},
{
"code": "def MulOptionsLTMul (x y : PGame) : Prop := ∀ ⦃i j⦄, ⟦mulOption x y i j⟧ < (⟦x * y⟧ : Game)",
"end": [
365,
92
],
"full_name": "Surreal.Multiplication.MulOptionsLTMul",
"kind": "commanddeclaration",
"start": [
364,
1
]
},
{
"code": "lemma mulOptionsLTMul_of_numeric (hn : (x * y).Numeric) :\n (MulOptionsLTMul x y ∧ MulOptionsLTMul (-x) (-y)) ∧\n (MulOptionsLTMul x (-y) ∧ MulOptionsLTMul (-x) y) := by\n constructor\n · have h := hn.moveLeft_lt\n simp_rw [lt_iff_game_lt] at h\n convert (leftMoves_mul_iff <| GT.gt _).1 h\n rw [← quot_neg_mul_neg]\n rfl\n · have h := hn.lt_moveRight\n simp_rw [lt_iff_game_lt, rightMoves_mul_iff] at h\n refine h.imp ?_ ?_ <;> refine forall₂_imp fun a b ↦ ?_\n all_goals\n rw [lt_neg]\n first | rw [quot_mul_neg] | rw [quot_neg_mul]\n exact id",
"end": [
386,
15
],
"full_name": "Surreal.Multiplication.mulOptionsLTMul_of_numeric",
"kind": "lemma",
"start": [
367,
1
]
},
{
"code": "def IH3 (x₁ x' x₂ y₁ y₂ : PGame) : Prop :=\n P2 x₁ x' y₁ ∧ P2 x₁ x' y₂ ∧ P3 x' x₂ y₁ y₂ ∧ (x₁ < x' → P3 x₁ x' y₁ y₂)",
"end": [
395,
76
],
"full_name": "Surreal.Multiplication.IH3",
"kind": "commanddeclaration",
"start": [
388,
1
]
},
{
"code": "lemma ih3_of_ih (h24 : IH24 x₁ x₂ y) (h4 : IH4 x₁ x₂ y) (hl : MulOptionsLTMul x₂ y) (i j) :\n IH3 x₁ (x₂.moveLeft i) x₂ (y.moveLeft j) y :=\n have ml := @IsOption.moveLeft\n have h24 := (@h24 _).2.1 (ml i)\n ⟨(h4 <| ml j).2 (ml i), h24.1, mulOption_lt_mul_iff_P3.1 (@hl i j), fun l ↦ (h24.2 l).1 _⟩",
"end": [
401,
93
],
"full_name": "Surreal.Multiplication.ih3_of_ih",
"kind": "lemma",
"start": [
397,
1
]
},
{
"code": "lemma P3_of_le_left {y₁ y₂} (i) (h : IH3 x₁ (x₂.moveLeft i) x₂ y₁ y₂) (hl : x₁ ≤ x₂.moveLeft i) :\n P3 x₁ x₂ y₁ y₂ := by\n obtain (hl|he) := lt_or_equiv_of_le hl\n · exact (h.2.2.2 hl).trans h.2.2.1\n · rw [P3, h.1 he, h.2.1 he]\n exact h.2.2.1",
"end": [
408,
18
],
"full_name": "Surreal.Multiplication.P3_of_le_left",
"kind": "lemma",
"start": [
403,
1
]
},
{
"code": "theorem P3_of_lt {y₁ y₂} (h : ∀ i, IH3 x₁ (x₂.moveLeft i) x₂ y₁ y₂)\n (hs : ∀ i, IH3 (-x₂) ((-x₁).moveLeft i) (-x₁) y₁ y₂) (hl : x₁ < x₂) :\n P3 x₁ x₂ y₁ y₂",
"end": [
419,
45
],
"full_name": "Surreal.Multiplication.P3_of_lt",
"kind": "commanddeclaration",
"start": [
410,
1
]
},
{
"code": "theorem main (a : Args) : a.Numeric → P124 a",
"end": [
448,
50
],
"full_name": "Surreal.Multiplication.main",
"kind": "commanddeclaration",
"start": [
421,
1
]
},
{
"code": "theorem Numeric.mul : Numeric (x * y)",
"end": [
459,
80
],
"full_name": "SetTheory.PGame.Numeric.mul",
"kind": "commanddeclaration",
"start": [
459,
1
]
},
{
"code": "theorem P24 : P24 x₁ x₂ y",
"end": [
461,
75
],
"full_name": "SetTheory.PGame.P24",
"kind": "commanddeclaration",
"start": [
461,
1
]
},
{
"code": "theorem Equiv.mul_congr_left (he : x₁ ≈ x₂) : x₁ * y ≈ x₂ * y",
"end": [
464,
47
],
"full_name": "SetTheory.PGame.Equiv.mul_congr_left",
"kind": "commanddeclaration",
"start": [
463,
1
]
},
{
"code": "theorem Equiv.mul_congr_right (he : y₁ ≈ y₂) : x * y₁ ≈ x * y₂",
"end": [
467,
92
],
"full_name": "SetTheory.PGame.Equiv.mul_congr_right",
"kind": "commanddeclaration",
"start": [
466,
1
]
},
{
"code": "theorem Equiv.mul_congr (hx : x₁ ≈ x₂) (hy : y₁ ≈ y₂) : x₁ * y₁ ≈ x₂ * y₂",
"end": [
470,
74
],
"full_name": "SetTheory.PGame.Equiv.mul_congr",
"kind": "commanddeclaration",
"start": [
469,
1
]
},
{
"code": "theorem P3_of_lt_of_lt (hx : x₁ < x₂) (hy : y₁ < y₂) : P3 x₁ x₂ y₁ y₂",
"end": [
489,
72
],
"full_name": "SetTheory.PGame.P3_of_lt_of_lt",
"kind": "commanddeclaration",
"start": [
474,
1
]
},
{
"code": "theorem Numeric.mul_pos (hp₁ : 0 < x₁) (hp₂ : 0 < x₂) : 0 < x₁ * x₂",
"end": [
495,
13
],
"full_name": "SetTheory.PGame.Numeric.mul_pos",
"kind": "commanddeclaration",
"start": [
491,
1
]
}
] | 1 | Surreal.Multiplication.P3.trans | [
[
100,
80
],
[
103,
44
]
] | 1 | 3 | rw [P3, ← add_lt_add_iff_left (⟦x₂ * y₁⟧ + ⟦x₂ * y₂⟧)] | x x₁ x₂ x₃ x' y y₁ y₂ y₃ y' : PGame
h₁ : ⟦x₁ * y₂⟧ + ⟦x₂ * y₁⟧ < ⟦x₁ * y₁⟧ + ⟦x₂ * y₂⟧
h₂ : ⟦x₂ * y₂⟧ + ⟦x₃ * y₁⟧ < ⟦x₂ * y₁⟧ + ⟦x₃ * y₂⟧
⊢ P3 x₁ x₃ y₁ y₂ | x x₁ x₂ x₃ x' y y₁ y₂ y₃ y' : PGame
h₁ : ⟦x₁ * y₂⟧ + ⟦x₂ * y₁⟧ < ⟦x₁ * y₁⟧ + ⟦x₂ * y₂⟧
h₂ : ⟦x₂ * y₂⟧ + ⟦x₃ * y₁⟧ < ⟦x₂ * y₁⟧ + ⟦x₃ * y₂⟧
⊢ ⟦x₂ * y₁⟧ + ⟦x₂ * y₂⟧ + (⟦x₁ * y₂⟧ + ⟦x₃ * y₁⟧) < ⟦x₂ * y₁⟧ + ⟦x₂ * y₂⟧ + (⟦x₁ * y₁⟧ + ⟦x₃ * y₂⟧) |
Mathlib/SetTheory/Surreal/Multiplication.lean | [
[
"Mathlib.SetTheory.Surreal.Basic",
"Mathlib/SetTheory/Surreal/Basic.lean"
],
[
"Mathlib.Logic.Hydra",
"Mathlib/Logic/Hydra.lean"
],
[
"Init",
".lake/packages/lean4/src/lean/Init.lean"
]
] | [
{
"code": "def P1 (x₁ x₂ x₃ y₁ y₂ y₃ : PGame) :=\n ⟦x₁ * y₁⟧ + ⟦x₂ * y₂⟧ - ⟦x₁ * y₂⟧ < ⟦x₃ * y₁⟧ + ⟦x₂ * y₃⟧ - (⟦x₃ * y₃⟧ : Game)",
"end": [
74,
81
],
"full_name": "Surreal.Multiplication.P1",
"kind": "commanddeclaration",
"start": [
71,
1
]
},
{
"code": "def P2 (x₁ x₂ y : PGame) := x₁ ≈ x₂ → ⟦x₁ * y⟧ = (⟦x₂ * y⟧ : Game)",
"end": [
77,
67
],
"full_name": "Surreal.Multiplication.P2",
"kind": "commanddeclaration",
"start": [
76,
1
]
},
{
"code": "def P3 (x₁ x₂ y₁ y₂ : PGame) := ⟦x₁ * y₂⟧ + ⟦x₂ * y₁⟧ < ⟦x₁ * y₁⟧ + (⟦x₂ * y₂⟧ : Game)",
"end": [
80,
87
],
"full_name": "Surreal.Multiplication.P3",
"kind": "commanddeclaration",
"start": [
79,
1
]
},
{
"code": "def P4 (x₁ x₂ y : PGame) :=\n x₁ < x₂ → (∀ i, P3 x₁ x₂ (y.moveLeft i) y) ∧ ∀ j, P3 x₁ x₂ ((-y).moveLeft j) (-y)",
"end": [
87,
84
],
"full_name": "Surreal.Multiplication.P4",
"kind": "commanddeclaration",
"start": [
82,
1
]
},
{
"code": "def P24 (x₁ x₂ y : PGame) : Prop := P2 x₁ x₂ y ∧ P4 x₁ x₂ y",
"end": [
90,
60
],
"full_name": "Surreal.Multiplication.P24",
"kind": "commanddeclaration",
"start": [
89,
1
]
},
{
"code": "lemma P3_comm : P3 x₁ x₂ y₁ y₂ ↔ P3 y₁ y₂ x₁ x₂ := by\n rw [P3, P3, add_comm]\n congr! 2 <;> rw [quot_mul_comm]",
"end": [
98,
34
],
"full_name": "Surreal.Multiplication.P3_comm",
"kind": "lemma",
"start": [
96,
1
]
},
{
"code": "lemma P3.trans (h₁ : P3 x₁ x₂ y₁ y₂) (h₂ : P3 x₂ x₃ y₁ y₂) : P3 x₁ x₃ y₁ y₂ := by\n rw [P3] at h₁ h₂\n rw [P3, ← add_lt_add_iff_left (⟦x₂ * y₁⟧ + ⟦x₂ * y₂⟧)]\n convert add_lt_add h₁ h₂ using 1 <;> abel",
"end": [
103,
44
],
"full_name": "Surreal.Multiplication.P3.trans",
"kind": "lemma",
"start": [
100,
1
]
},
{
"code": "lemma P3_neg : P3 x₁ x₂ y₁ y₂ ↔ P3 (-x₂) (-x₁) y₁ y₂ := by\n simp_rw [P3, quot_neg_mul]\n rw [← _root_.neg_lt_neg_iff]\n abel_nf",
"end": [
108,
10
],
"full_name": "Surreal.Multiplication.P3_neg",
"kind": "lemma",
"start": [
105,
1
]
},
{
"code": "lemma P2_neg_left : P2 x₁ x₂ y ↔ P2 (-x₂) (-x₁) y := by\n rw [P2, P2]\n constructor\n · rw [quot_neg_mul, quot_neg_mul, eq_comm, neg_inj, neg_equiv_neg_iff, PGame.equiv_comm]\n exact (· ·)\n · rw [PGame.equiv_comm, neg_equiv_neg_iff, quot_neg_mul, quot_neg_mul, neg_inj, eq_comm]\n exact (· ·)",
"end": [
116,
16
],
"full_name": "Surreal.Multiplication.P2_neg_left",
"kind": "lemma",
"start": [
110,
1
]
},
{
"code": "lemma P2_neg_right : P2 x₁ x₂ y ↔ P2 x₁ x₂ (-y) := by\n rw [P2, P2, quot_mul_neg, quot_mul_neg, neg_inj]",
"end": [
119,
51
],
"full_name": "Surreal.Multiplication.P2_neg_right",
"kind": "lemma",
"start": [
118,
1
]
},
{
"code": "lemma P4_neg_left : P4 x₁ x₂ y ↔ P4 (-x₂) (-x₁) y := by\n simp_rw [P4, PGame.neg_lt_neg_iff, moveLeft_neg', ← P3_neg]",
"end": [
122,
62
],
"full_name": "Surreal.Multiplication.P4_neg_left",
"kind": "lemma",
"start": [
121,
1
]
},
{
"code": "lemma P4_neg_right : P4 x₁ x₂ y ↔ P4 x₁ x₂ (-y) := by\n rw [P4, P4, neg_neg, and_comm]",
"end": [
125,
33
],
"full_name": "Surreal.Multiplication.P4_neg_right",
"kind": "lemma",
"start": [
124,
1
]
},
{
"code": "lemma P24_neg_left : P24 x₁ x₂ y ↔ P24 (-x₂) (-x₁) y := by rw [P24, P24, P2_neg_left, P4_neg_left]",
"end": [
127,
99
],
"full_name": "Surreal.Multiplication.P24_neg_left",
"kind": "lemma",
"start": [
127,
1
]
},
{
"code": "lemma P24_neg_right : P24 x₁ x₂ y ↔ P24 x₁ x₂ (-y) := by rw [P24, P24, P2_neg_right, P4_neg_right]",
"end": [
128,
99
],
"full_name": "Surreal.Multiplication.P24_neg_right",
"kind": "lemma",
"start": [
128,
1
]
},
{
"code": "lemma mulOption_lt_iff_P1 {i j k l} :\n (⟦mulOption x y i k⟧ : Game) < -⟦mulOption x (-y) j l⟧ ↔\n P1 (x.moveLeft i) x (x.moveLeft j) y (y.moveLeft k) (-(-y).moveLeft l) := by\n dsimp only [P1, mulOption, quot_sub, quot_add]\n simp_rw [neg_sub', neg_add, quot_mul_neg, neg_neg]",
"end": [
136,
53
],
"full_name": "Surreal.Multiplication.mulOption_lt_iff_P1",
"kind": "lemma",
"start": [
132,
1
]
},
{
"code": "lemma mulOption_lt_mul_iff_P3 {i j} :\n ⟦mulOption x y i j⟧ < (⟦x * y⟧ : Game) ↔ P3 (x.moveLeft i) x (y.moveLeft j) y := by\n dsimp only [mulOption, quot_sub, quot_add]\n exact sub_lt_iff_lt_add'",
"end": [
141,
27
],
"full_name": "Surreal.Multiplication.mulOption_lt_mul_iff_P3",
"kind": "lemma",
"start": [
138,
1
]
},
{
"code": "lemma P1_of_eq (he : x₁ ≈ x₃) (h₁ : P2 x₁ x₃ y₁) (h₃ : P2 x₁ x₃ y₃) (h3 : P3 x₁ x₂ y₂ y₃) :\n P1 x₁ x₂ x₃ y₁ y₂ y₃ := by\n rw [P1, ← h₁ he, ← h₃ he, sub_lt_sub_iff]\n convert add_lt_add_left h3 ⟦x₁ * y₁⟧ using 1 <;> abel",
"end": [
146,
56
],
"full_name": "Surreal.Multiplication.P1_of_eq",
"kind": "lemma",
"start": [
143,
1
]
},
{
"code": "lemma P1_of_lt (h₁ : P3 x₃ x₂ y₂ y₃) (h₂ : P3 x₁ x₃ y₂ y₁) : P1 x₁ x₂ x₃ y₁ y₂ y₃ := by\n rw [P1, sub_lt_sub_iff, ← add_lt_add_iff_left ⟦x₃ * y₂⟧]\n convert add_lt_add h₁ h₂ using 1 <;> abel",
"end": [
150,
44
],
"full_name": "Surreal.Multiplication.P1_of_lt",
"kind": "lemma",
"start": [
148,
1
]
},
{
"code": "inductive Args : Type (u+1)\n | P1 (x y : PGame.{u}) : Args\n | P24 (x₁ x₂ y : PGame.{u}) : Args",
"end": [
155,
37
],
"full_name": "Surreal.Multiplication.Args",
"kind": "commanddeclaration",
"start": [
152,
1
]
},
{
"code": "def Args.toMultiset : Args → Multiset PGame\n | (Args.P1 x y) => {x, y}\n | (Args.P24 x₁ x₂ y) => {x₁, x₂, y}",
"end": [
160,
38
],
"full_name": "Surreal.Multiplication.Args.toMultiset",
"kind": "commanddeclaration",
"start": [
157,
1
]
},
{
"code": "def Args.Numeric (a : Args) := ∀ x ∈ a.toMultiset, SetTheory.PGame.Numeric x",
"end": [
163,
77
],
"full_name": "Surreal.Multiplication.Args.Numeric",
"kind": "commanddeclaration",
"start": [
162,
1
]
},
{
"code": "lemma Args.numeric_P1 {x y} : (Args.P1 x y).Numeric ↔ x.Numeric ∧ y.Numeric := by\n simp [Args.Numeric, Args.toMultiset]",
"end": [
166,
39
],
"full_name": "Surreal.Multiplication.Args.numeric_P1",
"kind": "lemma",
"start": [
165,
1
]
},
{
"code": "lemma Args.numeric_P24 {x₁ x₂ y} :\n (Args.P24 x₁ x₂ y).Numeric ↔ x₁.Numeric ∧ x₂.Numeric ∧ y.Numeric := by\n simp [Args.Numeric, Args.toMultiset]",
"end": [
170,
39
],
"full_name": "Surreal.Multiplication.Args.numeric_P24",
"kind": "lemma",
"start": [
168,
1
]
},
{
"code": "def ArgsRel := InvImage (TransGen <| CutExpand IsOption) Args.toMultiset",
"end": [
177,
73
],
"full_name": "Surreal.Multiplication.ArgsRel",
"kind": "commanddeclaration",
"start": [
174,
1
]
},
{
"code": "theorem argsRel_wf : WellFounded ArgsRel",
"end": [
180,
89
],
"full_name": "Surreal.Multiplication.argsRel_wf",
"kind": "commanddeclaration",
"start": [
179,
1
]
},
{
"code": "def P124 : Args → Prop\n | (Args.P1 x y) => Numeric (x * y)\n | (Args.P24 x₁ x₂ y) => P24 x₁ x₂ y",
"end": [
185,
38
],
"full_name": "Surreal.Multiplication.P124",
"kind": "commanddeclaration",
"start": [
182,
1
]
},
{
"code": "lemma ArgsRel.numeric_closed {a' a} : ArgsRel a' a → a.Numeric → a'.Numeric :=\n TransGen.closed' <| @cutExpand_closed _ IsOption ⟨wf_isOption.isIrrefl.1⟩ _ Numeric.isOption",
"end": [
189,
95
],
"full_name": "Surreal.Multiplication.ArgsRel.numeric_closed",
"kind": "lemma",
"start": [
187,
1
]
},
{
"code": "def IH1 (x y : PGame) : Prop :=\n ∀ ⦃x₁ x₂ y'⦄, IsOption x₁ x → IsOption x₂ x → (y' = y ∨ IsOption y' y) → P24 x₁ x₂ y'",
"end": [
193,
88
],
"full_name": "Surreal.Multiplication.IH1",
"kind": "commanddeclaration",
"start": [
191,
1
]
},
{
"code": "lemma ih1_neg_left : IH1 x y → IH1 (-x) y :=\n fun h x₁ x₂ y' h₁ h₂ hy ↦ by\n rw [isOption_neg] at h₁ h₂\n exact P24_neg_left.2 (h h₂ h₁ hy)",
"end": [
200,
38
],
"full_name": "Surreal.Multiplication.ih1_neg_left",
"kind": "lemma",
"start": [
197,
1
]
},
{
"code": "lemma ih1_neg_right : IH1 x y → IH1 x (-y) :=\n fun h x₁ x₂ y' ↦ by\n rw [← neg_eq_iff_eq_neg, isOption_neg, P24_neg_right]\n apply h",
"end": [
205,
12
],
"full_name": "Surreal.Multiplication.ih1_neg_right",
"kind": "lemma",
"start": [
202,
1
]
},
{
"code": "lemma numeric_option_mul (h : IsOption x' x) : (x' * y).Numeric :=\n ih (Args.P1 x' y) (TransGen.single <| cutExpand_pair_left h)",
"end": [
212,
63
],
"full_name": "Surreal.Multiplication.numeric_option_mul",
"kind": "lemma",
"start": [
211,
1
]
},
{
"code": "lemma numeric_mul_option (h : IsOption y' y) : (x * y').Numeric :=\n ih (Args.P1 x y') (TransGen.single <| cutExpand_pair_right h)",
"end": [
215,
64
],
"full_name": "Surreal.Multiplication.numeric_mul_option",
"kind": "lemma",
"start": [
214,
1
]
},
{
"code": "lemma numeric_option_mul_option (hx : IsOption x' x) (hy : IsOption y' y) : (x' * y').Numeric :=\n ih (Args.P1 x' y') ((TransGen.single <| cutExpand_pair_right hy).tail <| cutExpand_pair_left hx)",
"end": [
218,
99
],
"full_name": "Surreal.Multiplication.numeric_option_mul_option",
"kind": "lemma",
"start": [
217,
1
]
},
{
"code": "lemma ih1 : IH1 x y := by\n rintro x₁ x₂ y' h₁ h₂ (rfl|hy) <;> apply ih (Args.P24 _ _ _)\n on_goal 2 => refine TransGen.tail ?_ (cutExpand_pair_right hy)\n all_goals exact TransGen.single (cutExpand_double_left h₁ h₂)",
"end": [
223,
64
],
"full_name": "Surreal.Multiplication.ih1",
"kind": "lemma",
"start": [
220,
1
]
},
{
"code": "lemma ih1_swap : IH1 y x := ih1 <| by\n simp_rw [ArgsRel, InvImage, Args.toMultiset, Multiset.pair_comm] at ih ⊢\n exact ih",
"end": [
227,
11
],
"full_name": "Surreal.Multiplication.ih1_swap",
"kind": "lemma",
"start": [
225,
1
]
},
{
"code": "lemma P3_of_ih (hy : Numeric y) (ihyx : IH1 y x) (i k l) :\n P3 (x.moveLeft i) x (y.moveLeft k) (-(-y).moveLeft l) :=\n P3_comm.2 <| ((ihyx (IsOption.moveLeft k) (isOption_neg.1 <| .moveLeft l) <| Or.inl rfl).2\n (by rw [← moveRight_neg_symm]; apply hy.left_lt_right)).1 i",
"end": [
232,
64
],
"full_name": "Surreal.Multiplication.P3_of_ih",
"kind": "lemma",
"start": [
229,
1
]
},
{
"code": "lemma P24_of_ih (ihxy : IH1 x y) (i j) : P24 (x.moveLeft i) (x.moveLeft j) y :=\n ihxy (IsOption.moveLeft i) (IsOption.moveLeft j) (Or.inl rfl)",
"end": [
235,
64
],
"full_name": "Surreal.Multiplication.P24_of_ih",
"kind": "lemma",
"start": [
234,
1
]
},
{
"code": "lemma mulOption_lt_of_lt (i j k l) (h : x.moveLeft i < x.moveLeft j) :\n (⟦mulOption x y i k⟧ : Game) < -⟦mulOption x (-y) j l⟧ :=\n mulOption_lt_iff_P1.2 <| P1_of_lt (P3_of_ih hy ihyx j k l) <| ((P24_of_ih ihxy i j).2 h).1 k",
"end": [
245,
95
],
"full_name": "Surreal.Multiplication.mulOption_lt_of_lt",
"kind": "lemma",
"start": [
243,
1
]
},
{
"code": "lemma mulOption_lt (i j k l) : (⟦mulOption x y i k⟧ : Game) < -⟦mulOption x (-y) j l⟧ := by\n obtain (h|h|h) := lt_or_equiv_or_gt (hx.moveLeft i) (hx.moveLeft j)\n · exact mulOption_lt_of_lt hy ihxy ihyx i j k l h\n · have ml := @IsOption.moveLeft\n exact mulOption_lt_iff_P1.2 (P1_of_eq h (P24_of_ih ihxy i j).1\n (ihxy (ml i) (ml j) <| Or.inr <| isOption_neg.1 <| ml l).1 <| P3_of_ih hy ihyx i k l)\n · rw [mulOption_neg_neg, lt_neg]\n exact mulOption_lt_of_lt hy.neg (ih1_neg_right ihxy) (ih1_neg_left ihyx) j i l _ h",
"end": [
254,
87
],
"full_name": "Surreal.Multiplication.mulOption_lt",
"kind": "lemma",
"start": [
247,
1
]
},
{
"code": "theorem P1_of_ih : (x * y).Numeric",
"end": [
281,
56
],
"full_name": "Surreal.Multiplication.P1_of_ih",
"kind": "commanddeclaration",
"start": [
258,
1
]
},
{
"code": "def IH24 (x₁ x₂ y : PGame) : Prop :=\n ∀ ⦃z⦄, (IsOption z x₁ → P24 z x₂ y) ∧ (IsOption z x₂ → P24 x₁ z y) ∧ (IsOption z y → P24 x₁ x₂ z)",
"end": [
285,
100
],
"full_name": "Surreal.Multiplication.IH24",
"kind": "commanddeclaration",
"start": [
283,
1
]
},
{
"code": "def IH4 (x₁ x₂ y : PGame) : Prop :=\n ∀ ⦃z w⦄, IsOption w y → (IsOption z x₁ → P2 z x₂ w) ∧ (IsOption z x₂ → P2 x₁ z w)",
"end": [
289,
84
],
"full_name": "Surreal.Multiplication.IH4",
"kind": "commanddeclaration",
"start": [
287,
1
]
},
{
"code": "lemma ih₁₂ : IH24 x₁ x₂ y := by\n rw [IH24]\n refine fun z ↦ ⟨?_, ?_, ?_⟩ <;>\n refine fun h ↦ ih' (Args.P24 _ _ _) (TransGen.single ?_)\n · exact (cutExpand_add_right {y}).2 (cutExpand_pair_left h)\n · exact (cutExpand_add_left {x₁}).2 (cutExpand_pair_left h)\n · exact (cutExpand_add_left {x₁}).2 (cutExpand_pair_right h)",
"end": [
301,
63
],
"full_name": "Surreal.Multiplication.ih₁₂",
"kind": "lemma",
"start": [
295,
1
]
},
{
"code": "lemma ih₂₁ : IH24 x₂ x₁ y := ih₁₂ <| by\n simp_rw [ArgsRel, InvImage, Args.toMultiset, Multiset.pair_comm] at ih' ⊢\n suffices {x₁, y, x₂} = {x₂, y, x₁} by rwa [← this]\n dsimp only [Multiset.insert_eq_cons, ← Multiset.singleton_add] at ih' ⊢\n abel",
"end": [
307,
7
],
"full_name": "Surreal.Multiplication.ih₂₁",
"kind": "lemma",
"start": [
303,
1
]
},
{
"code": "lemma ih4 : IH4 x₁ x₂ y := by\n refine fun z w h ↦ ⟨?_, ?_⟩\n all_goals\n intro h'\n apply (ih' (Args.P24 _ _ _) <| (TransGen.single _).tail <|\n (cutExpand_add_left {x₁}).2 <| cutExpand_pair_right h).1\n try exact (cutExpand_add_right {w}).2 <| cutExpand_pair_left h'\n try exact (cutExpand_add_right {w}).2 <| cutExpand_pair_right h'",
"end": [
316,
69
],
"full_name": "Surreal.Multiplication.ih4",
"kind": "lemma",
"start": [
309,
1
]
},
{
"code": "lemma numeric_of_ih : (x₁ * y).Numeric ∧ (x₂ * y).Numeric := by\n constructor <;> refine ih' (Args.P1 _ _) (TransGen.single ?_)\n · exact (cutExpand_add_right {y}).2 <| (cutExpand_add_left {x₁}).2 cutExpand_zero\n · exact (cutExpand_add_right {x₂, y}).2 cutExpand_zero",
"end": [
321,
57
],
"full_name": "Surreal.Multiplication.numeric_of_ih",
"kind": "lemma",
"start": [
318,
1
]
},
{
"code": "lemma ih24_neg : IH24 x₁ x₂ y → IH24 (-x₂) (-x₁) y ∧ IH24 x₁ x₂ (-y) := by\n simp_rw [IH24, ← P24_neg_right, isOption_neg]\n refine fun h ↦ ⟨fun z ↦ ⟨?_, ?_, ?_⟩,\n fun z ↦ ⟨(@h z).1, (@h z).2.1, P24_neg_right.2 ∘ (@h <| -z).2.2⟩⟩\n all_goals\n rw [P24_neg_left]\n simp only [neg_neg]\n first | exact (@h <| -z).2.1 | exact (@h <| -z).1 | exact (@h z).2.2",
"end": [
331,
73
],
"full_name": "Surreal.Multiplication.ih24_neg",
"kind": "lemma",
"start": [
323,
1
]
},
{
"code": "lemma ih4_neg : IH4 x₁ x₂ y → IH4 (-x₂) (-x₁) y ∧ IH4 x₁ x₂ (-y) := by\n simp_rw [IH4, isOption_neg]\n refine fun h ↦ ⟨fun z w h' ↦ ?_, fun z w h' ↦ ?_⟩\n · convert (h h').symm using 2 <;> rw [P2_neg_left, neg_neg]\n · convert h h' using 2 <;> rw [P2_neg_right]",
"end": [
338,
47
],
"full_name": "Surreal.Multiplication.ih4_neg",
"kind": "lemma",
"start": [
333,
1
]
},
{
"code": "lemma mulOption_lt_mul_of_equiv (hn : x₁.Numeric) (h : IH24 x₁ x₂ y) (he : x₁ ≈ x₂) (i j) :\n ⟦mulOption x₁ y i j⟧ < (⟦x₂ * y⟧ : Game) := by\n convert sub_lt_iff_lt_add'.2 ((((@h _).1 <| IsOption.moveLeft i).2 _).1 j) using 1\n · rw [← ((@h _).2.2 <| IsOption.moveLeft j).1 he]\n rfl\n · rw [← lt_congr_right he]\n apply hn.moveLeft_lt",
"end": [
346,
25
],
"full_name": "Surreal.Multiplication.mulOption_lt_mul_of_equiv",
"kind": "lemma",
"start": [
340,
1
]
},
{
"code": "theorem mul_right_le_of_equiv (h₁ : x₁.Numeric) (h₂ : x₂.Numeric)\n (h₁₂ : IH24 x₁ x₂ y) (h₂₁ : IH24 x₂ x₁ y) (he : x₁ ≈ x₂) : x₁ * y ≤ x₂ * y",
"end": [
362,
73
],
"full_name": "Surreal.Multiplication.mul_right_le_of_equiv",
"kind": "commanddeclaration",
"start": [
348,
1
]
},
{
"code": "def MulOptionsLTMul (x y : PGame) : Prop := ∀ ⦃i j⦄, ⟦mulOption x y i j⟧ < (⟦x * y⟧ : Game)",
"end": [
365,
92
],
"full_name": "Surreal.Multiplication.MulOptionsLTMul",
"kind": "commanddeclaration",
"start": [
364,
1
]
},
{
"code": "lemma mulOptionsLTMul_of_numeric (hn : (x * y).Numeric) :\n (MulOptionsLTMul x y ∧ MulOptionsLTMul (-x) (-y)) ∧\n (MulOptionsLTMul x (-y) ∧ MulOptionsLTMul (-x) y) := by\n constructor\n · have h := hn.moveLeft_lt\n simp_rw [lt_iff_game_lt] at h\n convert (leftMoves_mul_iff <| GT.gt _).1 h\n rw [← quot_neg_mul_neg]\n rfl\n · have h := hn.lt_moveRight\n simp_rw [lt_iff_game_lt, rightMoves_mul_iff] at h\n refine h.imp ?_ ?_ <;> refine forall₂_imp fun a b ↦ ?_\n all_goals\n rw [lt_neg]\n first | rw [quot_mul_neg] | rw [quot_neg_mul]\n exact id",
"end": [
386,
15
],
"full_name": "Surreal.Multiplication.mulOptionsLTMul_of_numeric",
"kind": "lemma",
"start": [
367,
1
]
},
{
"code": "def IH3 (x₁ x' x₂ y₁ y₂ : PGame) : Prop :=\n P2 x₁ x' y₁ ∧ P2 x₁ x' y₂ ∧ P3 x' x₂ y₁ y₂ ∧ (x₁ < x' → P3 x₁ x' y₁ y₂)",
"end": [
395,
76
],
"full_name": "Surreal.Multiplication.IH3",
"kind": "commanddeclaration",
"start": [
388,
1
]
},
{
"code": "lemma ih3_of_ih (h24 : IH24 x₁ x₂ y) (h4 : IH4 x₁ x₂ y) (hl : MulOptionsLTMul x₂ y) (i j) :\n IH3 x₁ (x₂.moveLeft i) x₂ (y.moveLeft j) y :=\n have ml := @IsOption.moveLeft\n have h24 := (@h24 _).2.1 (ml i)\n ⟨(h4 <| ml j).2 (ml i), h24.1, mulOption_lt_mul_iff_P3.1 (@hl i j), fun l ↦ (h24.2 l).1 _⟩",
"end": [
401,
93
],
"full_name": "Surreal.Multiplication.ih3_of_ih",
"kind": "lemma",
"start": [
397,
1
]
},
{
"code": "lemma P3_of_le_left {y₁ y₂} (i) (h : IH3 x₁ (x₂.moveLeft i) x₂ y₁ y₂) (hl : x₁ ≤ x₂.moveLeft i) :\n P3 x₁ x₂ y₁ y₂ := by\n obtain (hl|he) := lt_or_equiv_of_le hl\n · exact (h.2.2.2 hl).trans h.2.2.1\n · rw [P3, h.1 he, h.2.1 he]\n exact h.2.2.1",
"end": [
408,
18
],
"full_name": "Surreal.Multiplication.P3_of_le_left",
"kind": "lemma",
"start": [
403,
1
]
},
{
"code": "theorem P3_of_lt {y₁ y₂} (h : ∀ i, IH3 x₁ (x₂.moveLeft i) x₂ y₁ y₂)\n (hs : ∀ i, IH3 (-x₂) ((-x₁).moveLeft i) (-x₁) y₁ y₂) (hl : x₁ < x₂) :\n P3 x₁ x₂ y₁ y₂",
"end": [
419,
45
],
"full_name": "Surreal.Multiplication.P3_of_lt",
"kind": "commanddeclaration",
"start": [
410,
1
]
},
{
"code": "theorem main (a : Args) : a.Numeric → P124 a",
"end": [
448,
50
],
"full_name": "Surreal.Multiplication.main",
"kind": "commanddeclaration",
"start": [
421,
1
]
},
{
"code": "theorem Numeric.mul : Numeric (x * y)",
"end": [
459,
80
],
"full_name": "SetTheory.PGame.Numeric.mul",
"kind": "commanddeclaration",
"start": [
459,
1
]
},
{
"code": "theorem P24 : P24 x₁ x₂ y",
"end": [
461,
75
],
"full_name": "SetTheory.PGame.P24",
"kind": "commanddeclaration",
"start": [
461,
1
]
},
{
"code": "theorem Equiv.mul_congr_left (he : x₁ ≈ x₂) : x₁ * y ≈ x₂ * y",
"end": [
464,
47
],
"full_name": "SetTheory.PGame.Equiv.mul_congr_left",
"kind": "commanddeclaration",
"start": [
463,
1
]
},
{
"code": "theorem Equiv.mul_congr_right (he : y₁ ≈ y₂) : x * y₁ ≈ x * y₂",
"end": [
467,
92
],
"full_name": "SetTheory.PGame.Equiv.mul_congr_right",
"kind": "commanddeclaration",
"start": [
466,
1
]
},
{
"code": "theorem Equiv.mul_congr (hx : x₁ ≈ x₂) (hy : y₁ ≈ y₂) : x₁ * y₁ ≈ x₂ * y₂",
"end": [
470,
74
],
"full_name": "SetTheory.PGame.Equiv.mul_congr",
"kind": "commanddeclaration",
"start": [
469,
1
]
},
{
"code": "theorem P3_of_lt_of_lt (hx : x₁ < x₂) (hy : y₁ < y₂) : P3 x₁ x₂ y₁ y₂",
"end": [
489,
72
],
"full_name": "SetTheory.PGame.P3_of_lt_of_lt",
"kind": "commanddeclaration",
"start": [
474,
1
]
},
{
"code": "theorem Numeric.mul_pos (hp₁ : 0 < x₁) (hp₂ : 0 < x₂) : 0 < x₁ * x₂",
"end": [
495,
13
],
"full_name": "SetTheory.PGame.Numeric.mul_pos",
"kind": "commanddeclaration",
"start": [
491,
1
]
}
] | 1 | Surreal.Multiplication.P3.trans | [
[
100,
80
],
[
103,
44
]
] | 2 | 3 | convert add_lt_add h₁ h₂ using 1 <;> abel | x x₁ x₂ x₃ x' y y₁ y₂ y₃ y' : PGame
h₁ : ⟦x₁ * y₂⟧ + ⟦x₂ * y₁⟧ < ⟦x₁ * y₁⟧ + ⟦x₂ * y₂⟧
h₂ : ⟦x₂ * y₂⟧ + ⟦x₃ * y₁⟧ < ⟦x₂ * y₁⟧ + ⟦x₃ * y₂⟧
⊢ ⟦x₂ * y₁⟧ + ⟦x₂ * y₂⟧ + (⟦x₁ * y₂⟧ + ⟦x₃ * y₁⟧) < ⟦x₂ * y₁⟧ + ⟦x₂ * y₂⟧ + (⟦x₁ * y₁⟧ + ⟦x₃ * y₂⟧) | no goals |
Mathlib/SetTheory/Surreal/Multiplication.lean | [
[
"Mathlib.SetTheory.Surreal.Basic",
"Mathlib/SetTheory/Surreal/Basic.lean"
],
[
"Mathlib.Logic.Hydra",
"Mathlib/Logic/Hydra.lean"
],
[
"Init",
".lake/packages/lean4/src/lean/Init.lean"
]
] | [
{
"code": "def P1 (x₁ x₂ x₃ y₁ y₂ y₃ : PGame) :=\n ⟦x₁ * y₁⟧ + ⟦x₂ * y₂⟧ - ⟦x₁ * y₂⟧ < ⟦x₃ * y₁⟧ + ⟦x₂ * y₃⟧ - (⟦x₃ * y₃⟧ : Game)",
"end": [
74,
81
],
"full_name": "Surreal.Multiplication.P1",
"kind": "commanddeclaration",
"start": [
71,
1
]
},
{
"code": "def P2 (x₁ x₂ y : PGame) := x₁ ≈ x₂ → ⟦x₁ * y⟧ = (⟦x₂ * y⟧ : Game)",
"end": [
77,
67
],
"full_name": "Surreal.Multiplication.P2",
"kind": "commanddeclaration",
"start": [
76,
1
]
},
{
"code": "def P3 (x₁ x₂ y₁ y₂ : PGame) := ⟦x₁ * y₂⟧ + ⟦x₂ * y₁⟧ < ⟦x₁ * y₁⟧ + (⟦x₂ * y₂⟧ : Game)",
"end": [
80,
87
],
"full_name": "Surreal.Multiplication.P3",
"kind": "commanddeclaration",
"start": [
79,
1
]
},
{
"code": "def P4 (x₁ x₂ y : PGame) :=\n x₁ < x₂ → (∀ i, P3 x₁ x₂ (y.moveLeft i) y) ∧ ∀ j, P3 x₁ x₂ ((-y).moveLeft j) (-y)",
"end": [
87,
84
],
"full_name": "Surreal.Multiplication.P4",
"kind": "commanddeclaration",
"start": [
82,
1
]
},
{
"code": "def P24 (x₁ x₂ y : PGame) : Prop := P2 x₁ x₂ y ∧ P4 x₁ x₂ y",
"end": [
90,
60
],
"full_name": "Surreal.Multiplication.P24",
"kind": "commanddeclaration",
"start": [
89,
1
]
},
{
"code": "lemma P3_comm : P3 x₁ x₂ y₁ y₂ ↔ P3 y₁ y₂ x₁ x₂ := by\n rw [P3, P3, add_comm]\n congr! 2 <;> rw [quot_mul_comm]",
"end": [
98,
34
],
"full_name": "Surreal.Multiplication.P3_comm",
"kind": "lemma",
"start": [
96,
1
]
},
{
"code": "lemma P3.trans (h₁ : P3 x₁ x₂ y₁ y₂) (h₂ : P3 x₂ x₃ y₁ y₂) : P3 x₁ x₃ y₁ y₂ := by\n rw [P3] at h₁ h₂\n rw [P3, ← add_lt_add_iff_left (⟦x₂ * y₁⟧ + ⟦x₂ * y₂⟧)]\n convert add_lt_add h₁ h₂ using 1 <;> abel",
"end": [
103,
44
],
"full_name": "Surreal.Multiplication.P3.trans",
"kind": "lemma",
"start": [
100,
1
]
},
{
"code": "lemma P3_neg : P3 x₁ x₂ y₁ y₂ ↔ P3 (-x₂) (-x₁) y₁ y₂ := by\n simp_rw [P3, quot_neg_mul]\n rw [← _root_.neg_lt_neg_iff]\n abel_nf",
"end": [
108,
10
],
"full_name": "Surreal.Multiplication.P3_neg",
"kind": "lemma",
"start": [
105,
1
]
},
{
"code": "lemma P2_neg_left : P2 x₁ x₂ y ↔ P2 (-x₂) (-x₁) y := by\n rw [P2, P2]\n constructor\n · rw [quot_neg_mul, quot_neg_mul, eq_comm, neg_inj, neg_equiv_neg_iff, PGame.equiv_comm]\n exact (· ·)\n · rw [PGame.equiv_comm, neg_equiv_neg_iff, quot_neg_mul, quot_neg_mul, neg_inj, eq_comm]\n exact (· ·)",
"end": [
116,
16
],
"full_name": "Surreal.Multiplication.P2_neg_left",
"kind": "lemma",
"start": [
110,
1
]
},
{
"code": "lemma P2_neg_right : P2 x₁ x₂ y ↔ P2 x₁ x₂ (-y) := by\n rw [P2, P2, quot_mul_neg, quot_mul_neg, neg_inj]",
"end": [
119,
51
],
"full_name": "Surreal.Multiplication.P2_neg_right",
"kind": "lemma",
"start": [
118,
1
]
},
{
"code": "lemma P4_neg_left : P4 x₁ x₂ y ↔ P4 (-x₂) (-x₁) y := by\n simp_rw [P4, PGame.neg_lt_neg_iff, moveLeft_neg', ← P3_neg]",
"end": [
122,
62
],
"full_name": "Surreal.Multiplication.P4_neg_left",
"kind": "lemma",
"start": [
121,
1
]
},
{
"code": "lemma P4_neg_right : P4 x₁ x₂ y ↔ P4 x₁ x₂ (-y) := by\n rw [P4, P4, neg_neg, and_comm]",
"end": [
125,
33
],
"full_name": "Surreal.Multiplication.P4_neg_right",
"kind": "lemma",
"start": [
124,
1
]
},
{
"code": "lemma P24_neg_left : P24 x₁ x₂ y ↔ P24 (-x₂) (-x₁) y := by rw [P24, P24, P2_neg_left, P4_neg_left]",
"end": [
127,
99
],
"full_name": "Surreal.Multiplication.P24_neg_left",
"kind": "lemma",
"start": [
127,
1
]
},
{
"code": "lemma P24_neg_right : P24 x₁ x₂ y ↔ P24 x₁ x₂ (-y) := by rw [P24, P24, P2_neg_right, P4_neg_right]",
"end": [
128,
99
],
"full_name": "Surreal.Multiplication.P24_neg_right",
"kind": "lemma",
"start": [
128,
1
]
},
{
"code": "lemma mulOption_lt_iff_P1 {i j k l} :\n (⟦mulOption x y i k⟧ : Game) < -⟦mulOption x (-y) j l⟧ ↔\n P1 (x.moveLeft i) x (x.moveLeft j) y (y.moveLeft k) (-(-y).moveLeft l) := by\n dsimp only [P1, mulOption, quot_sub, quot_add]\n simp_rw [neg_sub', neg_add, quot_mul_neg, neg_neg]",
"end": [
136,
53
],
"full_name": "Surreal.Multiplication.mulOption_lt_iff_P1",
"kind": "lemma",
"start": [
132,
1
]
},
{
"code": "lemma mulOption_lt_mul_iff_P3 {i j} :\n ⟦mulOption x y i j⟧ < (⟦x * y⟧ : Game) ↔ P3 (x.moveLeft i) x (y.moveLeft j) y := by\n dsimp only [mulOption, quot_sub, quot_add]\n exact sub_lt_iff_lt_add'",
"end": [
141,
27
],
"full_name": "Surreal.Multiplication.mulOption_lt_mul_iff_P3",
"kind": "lemma",
"start": [
138,
1
]
},
{
"code": "lemma P1_of_eq (he : x₁ ≈ x₃) (h₁ : P2 x₁ x₃ y₁) (h₃ : P2 x₁ x₃ y₃) (h3 : P3 x₁ x₂ y₂ y₃) :\n P1 x₁ x₂ x₃ y₁ y₂ y₃ := by\n rw [P1, ← h₁ he, ← h₃ he, sub_lt_sub_iff]\n convert add_lt_add_left h3 ⟦x₁ * y₁⟧ using 1 <;> abel",
"end": [
146,
56
],
"full_name": "Surreal.Multiplication.P1_of_eq",
"kind": "lemma",
"start": [
143,
1
]
},
{
"code": "lemma P1_of_lt (h₁ : P3 x₃ x₂ y₂ y₃) (h₂ : P3 x₁ x₃ y₂ y₁) : P1 x₁ x₂ x₃ y₁ y₂ y₃ := by\n rw [P1, sub_lt_sub_iff, ← add_lt_add_iff_left ⟦x₃ * y₂⟧]\n convert add_lt_add h₁ h₂ using 1 <;> abel",
"end": [
150,
44
],
"full_name": "Surreal.Multiplication.P1_of_lt",
"kind": "lemma",
"start": [
148,
1
]
},
{
"code": "inductive Args : Type (u+1)\n | P1 (x y : PGame.{u}) : Args\n | P24 (x₁ x₂ y : PGame.{u}) : Args",
"end": [
155,
37
],
"full_name": "Surreal.Multiplication.Args",
"kind": "commanddeclaration",
"start": [
152,
1
]
},
{
"code": "def Args.toMultiset : Args → Multiset PGame\n | (Args.P1 x y) => {x, y}\n | (Args.P24 x₁ x₂ y) => {x₁, x₂, y}",
"end": [
160,
38
],
"full_name": "Surreal.Multiplication.Args.toMultiset",
"kind": "commanddeclaration",
"start": [
157,
1
]
},
{
"code": "def Args.Numeric (a : Args) := ∀ x ∈ a.toMultiset, SetTheory.PGame.Numeric x",
"end": [
163,
77
],
"full_name": "Surreal.Multiplication.Args.Numeric",
"kind": "commanddeclaration",
"start": [
162,
1
]
},
{
"code": "lemma Args.numeric_P1 {x y} : (Args.P1 x y).Numeric ↔ x.Numeric ∧ y.Numeric := by\n simp [Args.Numeric, Args.toMultiset]",
"end": [
166,
39
],
"full_name": "Surreal.Multiplication.Args.numeric_P1",
"kind": "lemma",
"start": [
165,
1
]
},
{
"code": "lemma Args.numeric_P24 {x₁ x₂ y} :\n (Args.P24 x₁ x₂ y).Numeric ↔ x₁.Numeric ∧ x₂.Numeric ∧ y.Numeric := by\n simp [Args.Numeric, Args.toMultiset]",
"end": [
170,
39
],
"full_name": "Surreal.Multiplication.Args.numeric_P24",
"kind": "lemma",
"start": [
168,
1
]
},
{
"code": "def ArgsRel := InvImage (TransGen <| CutExpand IsOption) Args.toMultiset",
"end": [
177,
73
],
"full_name": "Surreal.Multiplication.ArgsRel",
"kind": "commanddeclaration",
"start": [
174,
1
]
},
{
"code": "theorem argsRel_wf : WellFounded ArgsRel",
"end": [
180,
89
],
"full_name": "Surreal.Multiplication.argsRel_wf",
"kind": "commanddeclaration",
"start": [
179,
1
]
},
{
"code": "def P124 : Args → Prop\n | (Args.P1 x y) => Numeric (x * y)\n | (Args.P24 x₁ x₂ y) => P24 x₁ x₂ y",
"end": [
185,
38
],
"full_name": "Surreal.Multiplication.P124",
"kind": "commanddeclaration",
"start": [
182,
1
]
},
{
"code": "lemma ArgsRel.numeric_closed {a' a} : ArgsRel a' a → a.Numeric → a'.Numeric :=\n TransGen.closed' <| @cutExpand_closed _ IsOption ⟨wf_isOption.isIrrefl.1⟩ _ Numeric.isOption",
"end": [
189,
95
],
"full_name": "Surreal.Multiplication.ArgsRel.numeric_closed",
"kind": "lemma",
"start": [
187,
1
]
},
{
"code": "def IH1 (x y : PGame) : Prop :=\n ∀ ⦃x₁ x₂ y'⦄, IsOption x₁ x → IsOption x₂ x → (y' = y ∨ IsOption y' y) → P24 x₁ x₂ y'",
"end": [
193,
88
],
"full_name": "Surreal.Multiplication.IH1",
"kind": "commanddeclaration",
"start": [
191,
1
]
},
{
"code": "lemma ih1_neg_left : IH1 x y → IH1 (-x) y :=\n fun h x₁ x₂ y' h₁ h₂ hy ↦ by\n rw [isOption_neg] at h₁ h₂\n exact P24_neg_left.2 (h h₂ h₁ hy)",
"end": [
200,
38
],
"full_name": "Surreal.Multiplication.ih1_neg_left",
"kind": "lemma",
"start": [
197,
1
]
},
{
"code": "lemma ih1_neg_right : IH1 x y → IH1 x (-y) :=\n fun h x₁ x₂ y' ↦ by\n rw [← neg_eq_iff_eq_neg, isOption_neg, P24_neg_right]\n apply h",
"end": [
205,
12
],
"full_name": "Surreal.Multiplication.ih1_neg_right",
"kind": "lemma",
"start": [
202,
1
]
},
{
"code": "lemma numeric_option_mul (h : IsOption x' x) : (x' * y).Numeric :=\n ih (Args.P1 x' y) (TransGen.single <| cutExpand_pair_left h)",
"end": [
212,
63
],
"full_name": "Surreal.Multiplication.numeric_option_mul",
"kind": "lemma",
"start": [
211,
1
]
},
{
"code": "lemma numeric_mul_option (h : IsOption y' y) : (x * y').Numeric :=\n ih (Args.P1 x y') (TransGen.single <| cutExpand_pair_right h)",
"end": [
215,
64
],
"full_name": "Surreal.Multiplication.numeric_mul_option",
"kind": "lemma",
"start": [
214,
1
]
},
{
"code": "lemma numeric_option_mul_option (hx : IsOption x' x) (hy : IsOption y' y) : (x' * y').Numeric :=\n ih (Args.P1 x' y') ((TransGen.single <| cutExpand_pair_right hy).tail <| cutExpand_pair_left hx)",
"end": [
218,
99
],
"full_name": "Surreal.Multiplication.numeric_option_mul_option",
"kind": "lemma",
"start": [
217,
1
]
},
{
"code": "lemma ih1 : IH1 x y := by\n rintro x₁ x₂ y' h₁ h₂ (rfl|hy) <;> apply ih (Args.P24 _ _ _)\n on_goal 2 => refine TransGen.tail ?_ (cutExpand_pair_right hy)\n all_goals exact TransGen.single (cutExpand_double_left h₁ h₂)",
"end": [
223,
64
],
"full_name": "Surreal.Multiplication.ih1",
"kind": "lemma",
"start": [
220,
1
]
},
{
"code": "lemma ih1_swap : IH1 y x := ih1 <| by\n simp_rw [ArgsRel, InvImage, Args.toMultiset, Multiset.pair_comm] at ih ⊢\n exact ih",
"end": [
227,
11
],
"full_name": "Surreal.Multiplication.ih1_swap",
"kind": "lemma",
"start": [
225,
1
]
},
{
"code": "lemma P3_of_ih (hy : Numeric y) (ihyx : IH1 y x) (i k l) :\n P3 (x.moveLeft i) x (y.moveLeft k) (-(-y).moveLeft l) :=\n P3_comm.2 <| ((ihyx (IsOption.moveLeft k) (isOption_neg.1 <| .moveLeft l) <| Or.inl rfl).2\n (by rw [← moveRight_neg_symm]; apply hy.left_lt_right)).1 i",
"end": [
232,
64
],
"full_name": "Surreal.Multiplication.P3_of_ih",
"kind": "lemma",
"start": [
229,
1
]
},
{
"code": "lemma P24_of_ih (ihxy : IH1 x y) (i j) : P24 (x.moveLeft i) (x.moveLeft j) y :=\n ihxy (IsOption.moveLeft i) (IsOption.moveLeft j) (Or.inl rfl)",
"end": [
235,
64
],
"full_name": "Surreal.Multiplication.P24_of_ih",
"kind": "lemma",
"start": [
234,
1
]
},
{
"code": "lemma mulOption_lt_of_lt (i j k l) (h : x.moveLeft i < x.moveLeft j) :\n (⟦mulOption x y i k⟧ : Game) < -⟦mulOption x (-y) j l⟧ :=\n mulOption_lt_iff_P1.2 <| P1_of_lt (P3_of_ih hy ihyx j k l) <| ((P24_of_ih ihxy i j).2 h).1 k",
"end": [
245,
95
],
"full_name": "Surreal.Multiplication.mulOption_lt_of_lt",
"kind": "lemma",
"start": [
243,
1
]
},
{
"code": "lemma mulOption_lt (i j k l) : (⟦mulOption x y i k⟧ : Game) < -⟦mulOption x (-y) j l⟧ := by\n obtain (h|h|h) := lt_or_equiv_or_gt (hx.moveLeft i) (hx.moveLeft j)\n · exact mulOption_lt_of_lt hy ihxy ihyx i j k l h\n · have ml := @IsOption.moveLeft\n exact mulOption_lt_iff_P1.2 (P1_of_eq h (P24_of_ih ihxy i j).1\n (ihxy (ml i) (ml j) <| Or.inr <| isOption_neg.1 <| ml l).1 <| P3_of_ih hy ihyx i k l)\n · rw [mulOption_neg_neg, lt_neg]\n exact mulOption_lt_of_lt hy.neg (ih1_neg_right ihxy) (ih1_neg_left ihyx) j i l _ h",
"end": [
254,
87
],
"full_name": "Surreal.Multiplication.mulOption_lt",
"kind": "lemma",
"start": [
247,
1
]
},
{
"code": "theorem P1_of_ih : (x * y).Numeric",
"end": [
281,
56
],
"full_name": "Surreal.Multiplication.P1_of_ih",
"kind": "commanddeclaration",
"start": [
258,
1
]
},
{
"code": "def IH24 (x₁ x₂ y : PGame) : Prop :=\n ∀ ⦃z⦄, (IsOption z x₁ → P24 z x₂ y) ∧ (IsOption z x₂ → P24 x₁ z y) ∧ (IsOption z y → P24 x₁ x₂ z)",
"end": [
285,
100
],
"full_name": "Surreal.Multiplication.IH24",
"kind": "commanddeclaration",
"start": [
283,
1
]
},
{
"code": "def IH4 (x₁ x₂ y : PGame) : Prop :=\n ∀ ⦃z w⦄, IsOption w y → (IsOption z x₁ → P2 z x₂ w) ∧ (IsOption z x₂ → P2 x₁ z w)",
"end": [
289,
84
],
"full_name": "Surreal.Multiplication.IH4",
"kind": "commanddeclaration",
"start": [
287,
1
]
},
{
"code": "lemma ih₁₂ : IH24 x₁ x₂ y := by\n rw [IH24]\n refine fun z ↦ ⟨?_, ?_, ?_⟩ <;>\n refine fun h ↦ ih' (Args.P24 _ _ _) (TransGen.single ?_)\n · exact (cutExpand_add_right {y}).2 (cutExpand_pair_left h)\n · exact (cutExpand_add_left {x₁}).2 (cutExpand_pair_left h)\n · exact (cutExpand_add_left {x₁}).2 (cutExpand_pair_right h)",
"end": [
301,
63
],
"full_name": "Surreal.Multiplication.ih₁₂",
"kind": "lemma",
"start": [
295,
1
]
},
{
"code": "lemma ih₂₁ : IH24 x₂ x₁ y := ih₁₂ <| by\n simp_rw [ArgsRel, InvImage, Args.toMultiset, Multiset.pair_comm] at ih' ⊢\n suffices {x₁, y, x₂} = {x₂, y, x₁} by rwa [← this]\n dsimp only [Multiset.insert_eq_cons, ← Multiset.singleton_add] at ih' ⊢\n abel",
"end": [
307,
7
],
"full_name": "Surreal.Multiplication.ih₂₁",
"kind": "lemma",
"start": [
303,
1
]
},
{
"code": "lemma ih4 : IH4 x₁ x₂ y := by\n refine fun z w h ↦ ⟨?_, ?_⟩\n all_goals\n intro h'\n apply (ih' (Args.P24 _ _ _) <| (TransGen.single _).tail <|\n (cutExpand_add_left {x₁}).2 <| cutExpand_pair_right h).1\n try exact (cutExpand_add_right {w}).2 <| cutExpand_pair_left h'\n try exact (cutExpand_add_right {w}).2 <| cutExpand_pair_right h'",
"end": [
316,
69
],
"full_name": "Surreal.Multiplication.ih4",
"kind": "lemma",
"start": [
309,
1
]
},
{
"code": "lemma numeric_of_ih : (x₁ * y).Numeric ∧ (x₂ * y).Numeric := by\n constructor <;> refine ih' (Args.P1 _ _) (TransGen.single ?_)\n · exact (cutExpand_add_right {y}).2 <| (cutExpand_add_left {x₁}).2 cutExpand_zero\n · exact (cutExpand_add_right {x₂, y}).2 cutExpand_zero",
"end": [
321,
57
],
"full_name": "Surreal.Multiplication.numeric_of_ih",
"kind": "lemma",
"start": [
318,
1
]
},
{
"code": "lemma ih24_neg : IH24 x₁ x₂ y → IH24 (-x₂) (-x₁) y ∧ IH24 x₁ x₂ (-y) := by\n simp_rw [IH24, ← P24_neg_right, isOption_neg]\n refine fun h ↦ ⟨fun z ↦ ⟨?_, ?_, ?_⟩,\n fun z ↦ ⟨(@h z).1, (@h z).2.1, P24_neg_right.2 ∘ (@h <| -z).2.2⟩⟩\n all_goals\n rw [P24_neg_left]\n simp only [neg_neg]\n first | exact (@h <| -z).2.1 | exact (@h <| -z).1 | exact (@h z).2.2",
"end": [
331,
73
],
"full_name": "Surreal.Multiplication.ih24_neg",
"kind": "lemma",
"start": [
323,
1
]
},
{
"code": "lemma ih4_neg : IH4 x₁ x₂ y → IH4 (-x₂) (-x₁) y ∧ IH4 x₁ x₂ (-y) := by\n simp_rw [IH4, isOption_neg]\n refine fun h ↦ ⟨fun z w h' ↦ ?_, fun z w h' ↦ ?_⟩\n · convert (h h').symm using 2 <;> rw [P2_neg_left, neg_neg]\n · convert h h' using 2 <;> rw [P2_neg_right]",
"end": [
338,
47
],
"full_name": "Surreal.Multiplication.ih4_neg",
"kind": "lemma",
"start": [
333,
1
]
},
{
"code": "lemma mulOption_lt_mul_of_equiv (hn : x₁.Numeric) (h : IH24 x₁ x₂ y) (he : x₁ ≈ x₂) (i j) :\n ⟦mulOption x₁ y i j⟧ < (⟦x₂ * y⟧ : Game) := by\n convert sub_lt_iff_lt_add'.2 ((((@h _).1 <| IsOption.moveLeft i).2 _).1 j) using 1\n · rw [← ((@h _).2.2 <| IsOption.moveLeft j).1 he]\n rfl\n · rw [← lt_congr_right he]\n apply hn.moveLeft_lt",
"end": [
346,
25
],
"full_name": "Surreal.Multiplication.mulOption_lt_mul_of_equiv",
"kind": "lemma",
"start": [
340,
1
]
},
{
"code": "theorem mul_right_le_of_equiv (h₁ : x₁.Numeric) (h₂ : x₂.Numeric)\n (h₁₂ : IH24 x₁ x₂ y) (h₂₁ : IH24 x₂ x₁ y) (he : x₁ ≈ x₂) : x₁ * y ≤ x₂ * y",
"end": [
362,
73
],
"full_name": "Surreal.Multiplication.mul_right_le_of_equiv",
"kind": "commanddeclaration",
"start": [
348,
1
]
},
{
"code": "def MulOptionsLTMul (x y : PGame) : Prop := ∀ ⦃i j⦄, ⟦mulOption x y i j⟧ < (⟦x * y⟧ : Game)",
"end": [
365,
92
],
"full_name": "Surreal.Multiplication.MulOptionsLTMul",
"kind": "commanddeclaration",
"start": [
364,
1
]
},
{
"code": "lemma mulOptionsLTMul_of_numeric (hn : (x * y).Numeric) :\n (MulOptionsLTMul x y ∧ MulOptionsLTMul (-x) (-y)) ∧\n (MulOptionsLTMul x (-y) ∧ MulOptionsLTMul (-x) y) := by\n constructor\n · have h := hn.moveLeft_lt\n simp_rw [lt_iff_game_lt] at h\n convert (leftMoves_mul_iff <| GT.gt _).1 h\n rw [← quot_neg_mul_neg]\n rfl\n · have h := hn.lt_moveRight\n simp_rw [lt_iff_game_lt, rightMoves_mul_iff] at h\n refine h.imp ?_ ?_ <;> refine forall₂_imp fun a b ↦ ?_\n all_goals\n rw [lt_neg]\n first | rw [quot_mul_neg] | rw [quot_neg_mul]\n exact id",
"end": [
386,
15
],
"full_name": "Surreal.Multiplication.mulOptionsLTMul_of_numeric",
"kind": "lemma",
"start": [
367,
1
]
},
{
"code": "def IH3 (x₁ x' x₂ y₁ y₂ : PGame) : Prop :=\n P2 x₁ x' y₁ ∧ P2 x₁ x' y₂ ∧ P3 x' x₂ y₁ y₂ ∧ (x₁ < x' → P3 x₁ x' y₁ y₂)",
"end": [
395,
76
],
"full_name": "Surreal.Multiplication.IH3",
"kind": "commanddeclaration",
"start": [
388,
1
]
},
{
"code": "lemma ih3_of_ih (h24 : IH24 x₁ x₂ y) (h4 : IH4 x₁ x₂ y) (hl : MulOptionsLTMul x₂ y) (i j) :\n IH3 x₁ (x₂.moveLeft i) x₂ (y.moveLeft j) y :=\n have ml := @IsOption.moveLeft\n have h24 := (@h24 _).2.1 (ml i)\n ⟨(h4 <| ml j).2 (ml i), h24.1, mulOption_lt_mul_iff_P3.1 (@hl i j), fun l ↦ (h24.2 l).1 _⟩",
"end": [
401,
93
],
"full_name": "Surreal.Multiplication.ih3_of_ih",
"kind": "lemma",
"start": [
397,
1
]
},
{
"code": "lemma P3_of_le_left {y₁ y₂} (i) (h : IH3 x₁ (x₂.moveLeft i) x₂ y₁ y₂) (hl : x₁ ≤ x₂.moveLeft i) :\n P3 x₁ x₂ y₁ y₂ := by\n obtain (hl|he) := lt_or_equiv_of_le hl\n · exact (h.2.2.2 hl).trans h.2.2.1\n · rw [P3, h.1 he, h.2.1 he]\n exact h.2.2.1",
"end": [
408,
18
],
"full_name": "Surreal.Multiplication.P3_of_le_left",
"kind": "lemma",
"start": [
403,
1
]
},
{
"code": "theorem P3_of_lt {y₁ y₂} (h : ∀ i, IH3 x₁ (x₂.moveLeft i) x₂ y₁ y₂)\n (hs : ∀ i, IH3 (-x₂) ((-x₁).moveLeft i) (-x₁) y₁ y₂) (hl : x₁ < x₂) :\n P3 x₁ x₂ y₁ y₂",
"end": [
419,
45
],
"full_name": "Surreal.Multiplication.P3_of_lt",
"kind": "commanddeclaration",
"start": [
410,
1
]
},
{
"code": "theorem main (a : Args) : a.Numeric → P124 a",
"end": [
448,
50
],
"full_name": "Surreal.Multiplication.main",
"kind": "commanddeclaration",
"start": [
421,
1
]
},
{
"code": "theorem Numeric.mul : Numeric (x * y)",
"end": [
459,
80
],
"full_name": "SetTheory.PGame.Numeric.mul",
"kind": "commanddeclaration",
"start": [
459,
1
]
},
{
"code": "theorem P24 : P24 x₁ x₂ y",
"end": [
461,
75
],
"full_name": "SetTheory.PGame.P24",
"kind": "commanddeclaration",
"start": [
461,
1
]
},
{
"code": "theorem Equiv.mul_congr_left (he : x₁ ≈ x₂) : x₁ * y ≈ x₂ * y",
"end": [
464,
47
],
"full_name": "SetTheory.PGame.Equiv.mul_congr_left",
"kind": "commanddeclaration",
"start": [
463,
1
]
},
{
"code": "theorem Equiv.mul_congr_right (he : y₁ ≈ y₂) : x * y₁ ≈ x * y₂",
"end": [
467,
92
],
"full_name": "SetTheory.PGame.Equiv.mul_congr_right",
"kind": "commanddeclaration",
"start": [
466,
1
]
},
{
"code": "theorem Equiv.mul_congr (hx : x₁ ≈ x₂) (hy : y₁ ≈ y₂) : x₁ * y₁ ≈ x₂ * y₂",
"end": [
470,
74
],
"full_name": "SetTheory.PGame.Equiv.mul_congr",
"kind": "commanddeclaration",
"start": [
469,
1
]
},
{
"code": "theorem P3_of_lt_of_lt (hx : x₁ < x₂) (hy : y₁ < y₂) : P3 x₁ x₂ y₁ y₂",
"end": [
489,
72
],
"full_name": "SetTheory.PGame.P3_of_lt_of_lt",
"kind": "commanddeclaration",
"start": [
474,
1
]
},
{
"code": "theorem Numeric.mul_pos (hp₁ : 0 < x₁) (hp₂ : 0 < x₂) : 0 < x₁ * x₂",
"end": [
495,
13
],
"full_name": "SetTheory.PGame.Numeric.mul_pos",
"kind": "commanddeclaration",
"start": [
491,
1
]
}
] | 2 | Surreal.Multiplication.P3_neg | [
[
105,
57
],
[
108,
10
]
] | 0 | 3 | simp_rw [P3, quot_neg_mul] | x x₁ x₂ x₃ x' y y₁ y₂ y₃ y' : PGame
⊢ P3 x₁ x₂ y₁ y₂ ↔ P3 (-x₂) (-x₁) y₁ y₂ | x x₁ x₂ x₃ x' y y₁ y₂ y₃ y' : PGame
⊢ ⟦x₁ * y₂⟧ + ⟦x₂ * y₁⟧ < ⟦x₁ * y₁⟧ + ⟦x₂ * y₂⟧ ↔ -⟦x₂ * y₂⟧ + -⟦x₁ * y₁⟧ < -⟦x₂ * y₁⟧ + -⟦x₁ * y₂⟧ |
Mathlib/SetTheory/Surreal/Multiplication.lean | [
[
"Mathlib.SetTheory.Surreal.Basic",
"Mathlib/SetTheory/Surreal/Basic.lean"
],
[
"Mathlib.Logic.Hydra",
"Mathlib/Logic/Hydra.lean"
],
[
"Init",
".lake/packages/lean4/src/lean/Init.lean"
]
] | [
{
"code": "def P1 (x₁ x₂ x₃ y₁ y₂ y₃ : PGame) :=\n ⟦x₁ * y₁⟧ + ⟦x₂ * y₂⟧ - ⟦x₁ * y₂⟧ < ⟦x₃ * y₁⟧ + ⟦x₂ * y₃⟧ - (⟦x₃ * y₃⟧ : Game)",
"end": [
74,
81
],
"full_name": "Surreal.Multiplication.P1",
"kind": "commanddeclaration",
"start": [
71,
1
]
},
{
"code": "def P2 (x₁ x₂ y : PGame) := x₁ ≈ x₂ → ⟦x₁ * y⟧ = (⟦x₂ * y⟧ : Game)",
"end": [
77,
67
],
"full_name": "Surreal.Multiplication.P2",
"kind": "commanddeclaration",
"start": [
76,
1
]
},
{
"code": "def P3 (x₁ x₂ y₁ y₂ : PGame) := ⟦x₁ * y₂⟧ + ⟦x₂ * y₁⟧ < ⟦x₁ * y₁⟧ + (⟦x₂ * y₂⟧ : Game)",
"end": [
80,
87
],
"full_name": "Surreal.Multiplication.P3",
"kind": "commanddeclaration",
"start": [
79,
1
]
},
{
"code": "def P4 (x₁ x₂ y : PGame) :=\n x₁ < x₂ → (∀ i, P3 x₁ x₂ (y.moveLeft i) y) ∧ ∀ j, P3 x₁ x₂ ((-y).moveLeft j) (-y)",
"end": [
87,
84
],
"full_name": "Surreal.Multiplication.P4",
"kind": "commanddeclaration",
"start": [
82,
1
]
},
{
"code": "def P24 (x₁ x₂ y : PGame) : Prop := P2 x₁ x₂ y ∧ P4 x₁ x₂ y",
"end": [
90,
60
],
"full_name": "Surreal.Multiplication.P24",
"kind": "commanddeclaration",
"start": [
89,
1
]
},
{
"code": "lemma P3_comm : P3 x₁ x₂ y₁ y₂ ↔ P3 y₁ y₂ x₁ x₂ := by\n rw [P3, P3, add_comm]\n congr! 2 <;> rw [quot_mul_comm]",
"end": [
98,
34
],
"full_name": "Surreal.Multiplication.P3_comm",
"kind": "lemma",
"start": [
96,
1
]
},
{
"code": "lemma P3.trans (h₁ : P3 x₁ x₂ y₁ y₂) (h₂ : P3 x₂ x₃ y₁ y₂) : P3 x₁ x₃ y₁ y₂ := by\n rw [P3] at h₁ h₂\n rw [P3, ← add_lt_add_iff_left (⟦x₂ * y₁⟧ + ⟦x₂ * y₂⟧)]\n convert add_lt_add h₁ h₂ using 1 <;> abel",
"end": [
103,
44
],
"full_name": "Surreal.Multiplication.P3.trans",
"kind": "lemma",
"start": [
100,
1
]
},
{
"code": "lemma P3_neg : P3 x₁ x₂ y₁ y₂ ↔ P3 (-x₂) (-x₁) y₁ y₂ := by\n simp_rw [P3, quot_neg_mul]\n rw [← _root_.neg_lt_neg_iff]\n abel_nf",
"end": [
108,
10
],
"full_name": "Surreal.Multiplication.P3_neg",
"kind": "lemma",
"start": [
105,
1
]
},
{
"code": "lemma P2_neg_left : P2 x₁ x₂ y ↔ P2 (-x₂) (-x₁) y := by\n rw [P2, P2]\n constructor\n · rw [quot_neg_mul, quot_neg_mul, eq_comm, neg_inj, neg_equiv_neg_iff, PGame.equiv_comm]\n exact (· ·)\n · rw [PGame.equiv_comm, neg_equiv_neg_iff, quot_neg_mul, quot_neg_mul, neg_inj, eq_comm]\n exact (· ·)",
"end": [
116,
16
],
"full_name": "Surreal.Multiplication.P2_neg_left",
"kind": "lemma",
"start": [
110,
1
]
},
{
"code": "lemma P2_neg_right : P2 x₁ x₂ y ↔ P2 x₁ x₂ (-y) := by\n rw [P2, P2, quot_mul_neg, quot_mul_neg, neg_inj]",
"end": [
119,
51
],
"full_name": "Surreal.Multiplication.P2_neg_right",
"kind": "lemma",
"start": [
118,
1
]
},
{
"code": "lemma P4_neg_left : P4 x₁ x₂ y ↔ P4 (-x₂) (-x₁) y := by\n simp_rw [P4, PGame.neg_lt_neg_iff, moveLeft_neg', ← P3_neg]",
"end": [
122,
62
],
"full_name": "Surreal.Multiplication.P4_neg_left",
"kind": "lemma",
"start": [
121,
1
]
},
{
"code": "lemma P4_neg_right : P4 x₁ x₂ y ↔ P4 x₁ x₂ (-y) := by\n rw [P4, P4, neg_neg, and_comm]",
"end": [
125,
33
],
"full_name": "Surreal.Multiplication.P4_neg_right",
"kind": "lemma",
"start": [
124,
1
]
},
{
"code": "lemma P24_neg_left : P24 x₁ x₂ y ↔ P24 (-x₂) (-x₁) y := by rw [P24, P24, P2_neg_left, P4_neg_left]",
"end": [
127,
99
],
"full_name": "Surreal.Multiplication.P24_neg_left",
"kind": "lemma",
"start": [
127,
1
]
},
{
"code": "lemma P24_neg_right : P24 x₁ x₂ y ↔ P24 x₁ x₂ (-y) := by rw [P24, P24, P2_neg_right, P4_neg_right]",
"end": [
128,
99
],
"full_name": "Surreal.Multiplication.P24_neg_right",
"kind": "lemma",
"start": [
128,
1
]
},
{
"code": "lemma mulOption_lt_iff_P1 {i j k l} :\n (⟦mulOption x y i k⟧ : Game) < -⟦mulOption x (-y) j l⟧ ↔\n P1 (x.moveLeft i) x (x.moveLeft j) y (y.moveLeft k) (-(-y).moveLeft l) := by\n dsimp only [P1, mulOption, quot_sub, quot_add]\n simp_rw [neg_sub', neg_add, quot_mul_neg, neg_neg]",
"end": [
136,
53
],
"full_name": "Surreal.Multiplication.mulOption_lt_iff_P1",
"kind": "lemma",
"start": [
132,
1
]
},
{
"code": "lemma mulOption_lt_mul_iff_P3 {i j} :\n ⟦mulOption x y i j⟧ < (⟦x * y⟧ : Game) ↔ P3 (x.moveLeft i) x (y.moveLeft j) y := by\n dsimp only [mulOption, quot_sub, quot_add]\n exact sub_lt_iff_lt_add'",
"end": [
141,
27
],
"full_name": "Surreal.Multiplication.mulOption_lt_mul_iff_P3",
"kind": "lemma",
"start": [
138,
1
]
},
{
"code": "lemma P1_of_eq (he : x₁ ≈ x₃) (h₁ : P2 x₁ x₃ y₁) (h₃ : P2 x₁ x₃ y₃) (h3 : P3 x₁ x₂ y₂ y₃) :\n P1 x₁ x₂ x₃ y₁ y₂ y₃ := by\n rw [P1, ← h₁ he, ← h₃ he, sub_lt_sub_iff]\n convert add_lt_add_left h3 ⟦x₁ * y₁⟧ using 1 <;> abel",
"end": [
146,
56
],
"full_name": "Surreal.Multiplication.P1_of_eq",
"kind": "lemma",
"start": [
143,
1
]
},
{
"code": "lemma P1_of_lt (h₁ : P3 x₃ x₂ y₂ y₃) (h₂ : P3 x₁ x₃ y₂ y₁) : P1 x₁ x₂ x₃ y₁ y₂ y₃ := by\n rw [P1, sub_lt_sub_iff, ← add_lt_add_iff_left ⟦x₃ * y₂⟧]\n convert add_lt_add h₁ h₂ using 1 <;> abel",
"end": [
150,
44
],
"full_name": "Surreal.Multiplication.P1_of_lt",
"kind": "lemma",
"start": [
148,
1
]
},
{
"code": "inductive Args : Type (u+1)\n | P1 (x y : PGame.{u}) : Args\n | P24 (x₁ x₂ y : PGame.{u}) : Args",
"end": [
155,
37
],
"full_name": "Surreal.Multiplication.Args",
"kind": "commanddeclaration",
"start": [
152,
1
]
},
{
"code": "def Args.toMultiset : Args → Multiset PGame\n | (Args.P1 x y) => {x, y}\n | (Args.P24 x₁ x₂ y) => {x₁, x₂, y}",
"end": [
160,
38
],
"full_name": "Surreal.Multiplication.Args.toMultiset",
"kind": "commanddeclaration",
"start": [
157,
1
]
},
{
"code": "def Args.Numeric (a : Args) := ∀ x ∈ a.toMultiset, SetTheory.PGame.Numeric x",
"end": [
163,
77
],
"full_name": "Surreal.Multiplication.Args.Numeric",
"kind": "commanddeclaration",
"start": [
162,
1
]
},
{
"code": "lemma Args.numeric_P1 {x y} : (Args.P1 x y).Numeric ↔ x.Numeric ∧ y.Numeric := by\n simp [Args.Numeric, Args.toMultiset]",
"end": [
166,
39
],
"full_name": "Surreal.Multiplication.Args.numeric_P1",
"kind": "lemma",
"start": [
165,
1
]
},
{
"code": "lemma Args.numeric_P24 {x₁ x₂ y} :\n (Args.P24 x₁ x₂ y).Numeric ↔ x₁.Numeric ∧ x₂.Numeric ∧ y.Numeric := by\n simp [Args.Numeric, Args.toMultiset]",
"end": [
170,
39
],
"full_name": "Surreal.Multiplication.Args.numeric_P24",
"kind": "lemma",
"start": [
168,
1
]
},
{
"code": "def ArgsRel := InvImage (TransGen <| CutExpand IsOption) Args.toMultiset",
"end": [
177,
73
],
"full_name": "Surreal.Multiplication.ArgsRel",
"kind": "commanddeclaration",
"start": [
174,
1
]
},
{
"code": "theorem argsRel_wf : WellFounded ArgsRel",
"end": [
180,
89
],
"full_name": "Surreal.Multiplication.argsRel_wf",
"kind": "commanddeclaration",
"start": [
179,
1
]
},
{
"code": "def P124 : Args → Prop\n | (Args.P1 x y) => Numeric (x * y)\n | (Args.P24 x₁ x₂ y) => P24 x₁ x₂ y",
"end": [
185,
38
],
"full_name": "Surreal.Multiplication.P124",
"kind": "commanddeclaration",
"start": [
182,
1
]
},
{
"code": "lemma ArgsRel.numeric_closed {a' a} : ArgsRel a' a → a.Numeric → a'.Numeric :=\n TransGen.closed' <| @cutExpand_closed _ IsOption ⟨wf_isOption.isIrrefl.1⟩ _ Numeric.isOption",
"end": [
189,
95
],
"full_name": "Surreal.Multiplication.ArgsRel.numeric_closed",
"kind": "lemma",
"start": [
187,
1
]
},
{
"code": "def IH1 (x y : PGame) : Prop :=\n ∀ ⦃x₁ x₂ y'⦄, IsOption x₁ x → IsOption x₂ x → (y' = y ∨ IsOption y' y) → P24 x₁ x₂ y'",
"end": [
193,
88
],
"full_name": "Surreal.Multiplication.IH1",
"kind": "commanddeclaration",
"start": [
191,
1
]
},
{
"code": "lemma ih1_neg_left : IH1 x y → IH1 (-x) y :=\n fun h x₁ x₂ y' h₁ h₂ hy ↦ by\n rw [isOption_neg] at h₁ h₂\n exact P24_neg_left.2 (h h₂ h₁ hy)",
"end": [
200,
38
],
"full_name": "Surreal.Multiplication.ih1_neg_left",
"kind": "lemma",
"start": [
197,
1
]
},
{
"code": "lemma ih1_neg_right : IH1 x y → IH1 x (-y) :=\n fun h x₁ x₂ y' ↦ by\n rw [← neg_eq_iff_eq_neg, isOption_neg, P24_neg_right]\n apply h",
"end": [
205,
12
],
"full_name": "Surreal.Multiplication.ih1_neg_right",
"kind": "lemma",
"start": [
202,
1
]
},
{
"code": "lemma numeric_option_mul (h : IsOption x' x) : (x' * y).Numeric :=\n ih (Args.P1 x' y) (TransGen.single <| cutExpand_pair_left h)",
"end": [
212,
63
],
"full_name": "Surreal.Multiplication.numeric_option_mul",
"kind": "lemma",
"start": [
211,
1
]
},
{
"code": "lemma numeric_mul_option (h : IsOption y' y) : (x * y').Numeric :=\n ih (Args.P1 x y') (TransGen.single <| cutExpand_pair_right h)",
"end": [
215,
64
],
"full_name": "Surreal.Multiplication.numeric_mul_option",
"kind": "lemma",
"start": [
214,
1
]
},
{
"code": "lemma numeric_option_mul_option (hx : IsOption x' x) (hy : IsOption y' y) : (x' * y').Numeric :=\n ih (Args.P1 x' y') ((TransGen.single <| cutExpand_pair_right hy).tail <| cutExpand_pair_left hx)",
"end": [
218,
99
],
"full_name": "Surreal.Multiplication.numeric_option_mul_option",
"kind": "lemma",
"start": [
217,
1
]
},
{
"code": "lemma ih1 : IH1 x y := by\n rintro x₁ x₂ y' h₁ h₂ (rfl|hy) <;> apply ih (Args.P24 _ _ _)\n on_goal 2 => refine TransGen.tail ?_ (cutExpand_pair_right hy)\n all_goals exact TransGen.single (cutExpand_double_left h₁ h₂)",
"end": [
223,
64
],
"full_name": "Surreal.Multiplication.ih1",
"kind": "lemma",
"start": [
220,
1
]
},
{
"code": "lemma ih1_swap : IH1 y x := ih1 <| by\n simp_rw [ArgsRel, InvImage, Args.toMultiset, Multiset.pair_comm] at ih ⊢\n exact ih",
"end": [
227,
11
],
"full_name": "Surreal.Multiplication.ih1_swap",
"kind": "lemma",
"start": [
225,
1
]
},
{
"code": "lemma P3_of_ih (hy : Numeric y) (ihyx : IH1 y x) (i k l) :\n P3 (x.moveLeft i) x (y.moveLeft k) (-(-y).moveLeft l) :=\n P3_comm.2 <| ((ihyx (IsOption.moveLeft k) (isOption_neg.1 <| .moveLeft l) <| Or.inl rfl).2\n (by rw [← moveRight_neg_symm]; apply hy.left_lt_right)).1 i",
"end": [
232,
64
],
"full_name": "Surreal.Multiplication.P3_of_ih",
"kind": "lemma",
"start": [
229,
1
]
},
{
"code": "lemma P24_of_ih (ihxy : IH1 x y) (i j) : P24 (x.moveLeft i) (x.moveLeft j) y :=\n ihxy (IsOption.moveLeft i) (IsOption.moveLeft j) (Or.inl rfl)",
"end": [
235,
64
],
"full_name": "Surreal.Multiplication.P24_of_ih",
"kind": "lemma",
"start": [
234,
1
]
},
{
"code": "lemma mulOption_lt_of_lt (i j k l) (h : x.moveLeft i < x.moveLeft j) :\n (⟦mulOption x y i k⟧ : Game) < -⟦mulOption x (-y) j l⟧ :=\n mulOption_lt_iff_P1.2 <| P1_of_lt (P3_of_ih hy ihyx j k l) <| ((P24_of_ih ihxy i j).2 h).1 k",
"end": [
245,
95
],
"full_name": "Surreal.Multiplication.mulOption_lt_of_lt",
"kind": "lemma",
"start": [
243,
1
]
},
{
"code": "lemma mulOption_lt (i j k l) : (⟦mulOption x y i k⟧ : Game) < -⟦mulOption x (-y) j l⟧ := by\n obtain (h|h|h) := lt_or_equiv_or_gt (hx.moveLeft i) (hx.moveLeft j)\n · exact mulOption_lt_of_lt hy ihxy ihyx i j k l h\n · have ml := @IsOption.moveLeft\n exact mulOption_lt_iff_P1.2 (P1_of_eq h (P24_of_ih ihxy i j).1\n (ihxy (ml i) (ml j) <| Or.inr <| isOption_neg.1 <| ml l).1 <| P3_of_ih hy ihyx i k l)\n · rw [mulOption_neg_neg, lt_neg]\n exact mulOption_lt_of_lt hy.neg (ih1_neg_right ihxy) (ih1_neg_left ihyx) j i l _ h",
"end": [
254,
87
],
"full_name": "Surreal.Multiplication.mulOption_lt",
"kind": "lemma",
"start": [
247,
1
]
},
{
"code": "theorem P1_of_ih : (x * y).Numeric",
"end": [
281,
56
],
"full_name": "Surreal.Multiplication.P1_of_ih",
"kind": "commanddeclaration",
"start": [
258,
1
]
},
{
"code": "def IH24 (x₁ x₂ y : PGame) : Prop :=\n ∀ ⦃z⦄, (IsOption z x₁ → P24 z x₂ y) ∧ (IsOption z x₂ → P24 x₁ z y) ∧ (IsOption z y → P24 x₁ x₂ z)",
"end": [
285,
100
],
"full_name": "Surreal.Multiplication.IH24",
"kind": "commanddeclaration",
"start": [
283,
1
]
},
{
"code": "def IH4 (x₁ x₂ y : PGame) : Prop :=\n ∀ ⦃z w⦄, IsOption w y → (IsOption z x₁ → P2 z x₂ w) ∧ (IsOption z x₂ → P2 x₁ z w)",
"end": [
289,
84
],
"full_name": "Surreal.Multiplication.IH4",
"kind": "commanddeclaration",
"start": [
287,
1
]
},
{
"code": "lemma ih₁₂ : IH24 x₁ x₂ y := by\n rw [IH24]\n refine fun z ↦ ⟨?_, ?_, ?_⟩ <;>\n refine fun h ↦ ih' (Args.P24 _ _ _) (TransGen.single ?_)\n · exact (cutExpand_add_right {y}).2 (cutExpand_pair_left h)\n · exact (cutExpand_add_left {x₁}).2 (cutExpand_pair_left h)\n · exact (cutExpand_add_left {x₁}).2 (cutExpand_pair_right h)",
"end": [
301,
63
],
"full_name": "Surreal.Multiplication.ih₁₂",
"kind": "lemma",
"start": [
295,
1
]
},
{
"code": "lemma ih₂₁ : IH24 x₂ x₁ y := ih₁₂ <| by\n simp_rw [ArgsRel, InvImage, Args.toMultiset, Multiset.pair_comm] at ih' ⊢\n suffices {x₁, y, x₂} = {x₂, y, x₁} by rwa [← this]\n dsimp only [Multiset.insert_eq_cons, ← Multiset.singleton_add] at ih' ⊢\n abel",
"end": [
307,
7
],
"full_name": "Surreal.Multiplication.ih₂₁",
"kind": "lemma",
"start": [
303,
1
]
},
{
"code": "lemma ih4 : IH4 x₁ x₂ y := by\n refine fun z w h ↦ ⟨?_, ?_⟩\n all_goals\n intro h'\n apply (ih' (Args.P24 _ _ _) <| (TransGen.single _).tail <|\n (cutExpand_add_left {x₁}).2 <| cutExpand_pair_right h).1\n try exact (cutExpand_add_right {w}).2 <| cutExpand_pair_left h'\n try exact (cutExpand_add_right {w}).2 <| cutExpand_pair_right h'",
"end": [
316,
69
],
"full_name": "Surreal.Multiplication.ih4",
"kind": "lemma",
"start": [
309,
1
]
},
{
"code": "lemma numeric_of_ih : (x₁ * y).Numeric ∧ (x₂ * y).Numeric := by\n constructor <;> refine ih' (Args.P1 _ _) (TransGen.single ?_)\n · exact (cutExpand_add_right {y}).2 <| (cutExpand_add_left {x₁}).2 cutExpand_zero\n · exact (cutExpand_add_right {x₂, y}).2 cutExpand_zero",
"end": [
321,
57
],
"full_name": "Surreal.Multiplication.numeric_of_ih",
"kind": "lemma",
"start": [
318,
1
]
},
{
"code": "lemma ih24_neg : IH24 x₁ x₂ y → IH24 (-x₂) (-x₁) y ∧ IH24 x₁ x₂ (-y) := by\n simp_rw [IH24, ← P24_neg_right, isOption_neg]\n refine fun h ↦ ⟨fun z ↦ ⟨?_, ?_, ?_⟩,\n fun z ↦ ⟨(@h z).1, (@h z).2.1, P24_neg_right.2 ∘ (@h <| -z).2.2⟩⟩\n all_goals\n rw [P24_neg_left]\n simp only [neg_neg]\n first | exact (@h <| -z).2.1 | exact (@h <| -z).1 | exact (@h z).2.2",
"end": [
331,
73
],
"full_name": "Surreal.Multiplication.ih24_neg",
"kind": "lemma",
"start": [
323,
1
]
},
{
"code": "lemma ih4_neg : IH4 x₁ x₂ y → IH4 (-x₂) (-x₁) y ∧ IH4 x₁ x₂ (-y) := by\n simp_rw [IH4, isOption_neg]\n refine fun h ↦ ⟨fun z w h' ↦ ?_, fun z w h' ↦ ?_⟩\n · convert (h h').symm using 2 <;> rw [P2_neg_left, neg_neg]\n · convert h h' using 2 <;> rw [P2_neg_right]",
"end": [
338,
47
],
"full_name": "Surreal.Multiplication.ih4_neg",
"kind": "lemma",
"start": [
333,
1
]
},
{
"code": "lemma mulOption_lt_mul_of_equiv (hn : x₁.Numeric) (h : IH24 x₁ x₂ y) (he : x₁ ≈ x₂) (i j) :\n ⟦mulOption x₁ y i j⟧ < (⟦x₂ * y⟧ : Game) := by\n convert sub_lt_iff_lt_add'.2 ((((@h _).1 <| IsOption.moveLeft i).2 _).1 j) using 1\n · rw [← ((@h _).2.2 <| IsOption.moveLeft j).1 he]\n rfl\n · rw [← lt_congr_right he]\n apply hn.moveLeft_lt",
"end": [
346,
25
],
"full_name": "Surreal.Multiplication.mulOption_lt_mul_of_equiv",
"kind": "lemma",
"start": [
340,
1
]
},
{
"code": "theorem mul_right_le_of_equiv (h₁ : x₁.Numeric) (h₂ : x₂.Numeric)\n (h₁₂ : IH24 x₁ x₂ y) (h₂₁ : IH24 x₂ x₁ y) (he : x₁ ≈ x₂) : x₁ * y ≤ x₂ * y",
"end": [
362,
73
],
"full_name": "Surreal.Multiplication.mul_right_le_of_equiv",
"kind": "commanddeclaration",
"start": [
348,
1
]
},
{
"code": "def MulOptionsLTMul (x y : PGame) : Prop := ∀ ⦃i j⦄, ⟦mulOption x y i j⟧ < (⟦x * y⟧ : Game)",
"end": [
365,
92
],
"full_name": "Surreal.Multiplication.MulOptionsLTMul",
"kind": "commanddeclaration",
"start": [
364,
1
]
},
{
"code": "lemma mulOptionsLTMul_of_numeric (hn : (x * y).Numeric) :\n (MulOptionsLTMul x y ∧ MulOptionsLTMul (-x) (-y)) ∧\n (MulOptionsLTMul x (-y) ∧ MulOptionsLTMul (-x) y) := by\n constructor\n · have h := hn.moveLeft_lt\n simp_rw [lt_iff_game_lt] at h\n convert (leftMoves_mul_iff <| GT.gt _).1 h\n rw [← quot_neg_mul_neg]\n rfl\n · have h := hn.lt_moveRight\n simp_rw [lt_iff_game_lt, rightMoves_mul_iff] at h\n refine h.imp ?_ ?_ <;> refine forall₂_imp fun a b ↦ ?_\n all_goals\n rw [lt_neg]\n first | rw [quot_mul_neg] | rw [quot_neg_mul]\n exact id",
"end": [
386,
15
],
"full_name": "Surreal.Multiplication.mulOptionsLTMul_of_numeric",
"kind": "lemma",
"start": [
367,
1
]
},
{
"code": "def IH3 (x₁ x' x₂ y₁ y₂ : PGame) : Prop :=\n P2 x₁ x' y₁ ∧ P2 x₁ x' y₂ ∧ P3 x' x₂ y₁ y₂ ∧ (x₁ < x' → P3 x₁ x' y₁ y₂)",
"end": [
395,
76
],
"full_name": "Surreal.Multiplication.IH3",
"kind": "commanddeclaration",
"start": [
388,
1
]
},
{
"code": "lemma ih3_of_ih (h24 : IH24 x₁ x₂ y) (h4 : IH4 x₁ x₂ y) (hl : MulOptionsLTMul x₂ y) (i j) :\n IH3 x₁ (x₂.moveLeft i) x₂ (y.moveLeft j) y :=\n have ml := @IsOption.moveLeft\n have h24 := (@h24 _).2.1 (ml i)\n ⟨(h4 <| ml j).2 (ml i), h24.1, mulOption_lt_mul_iff_P3.1 (@hl i j), fun l ↦ (h24.2 l).1 _⟩",
"end": [
401,
93
],
"full_name": "Surreal.Multiplication.ih3_of_ih",
"kind": "lemma",
"start": [
397,
1
]
},
{
"code": "lemma P3_of_le_left {y₁ y₂} (i) (h : IH3 x₁ (x₂.moveLeft i) x₂ y₁ y₂) (hl : x₁ ≤ x₂.moveLeft i) :\n P3 x₁ x₂ y₁ y₂ := by\n obtain (hl|he) := lt_or_equiv_of_le hl\n · exact (h.2.2.2 hl).trans h.2.2.1\n · rw [P3, h.1 he, h.2.1 he]\n exact h.2.2.1",
"end": [
408,
18
],
"full_name": "Surreal.Multiplication.P3_of_le_left",
"kind": "lemma",
"start": [
403,
1
]
},
{
"code": "theorem P3_of_lt {y₁ y₂} (h : ∀ i, IH3 x₁ (x₂.moveLeft i) x₂ y₁ y₂)\n (hs : ∀ i, IH3 (-x₂) ((-x₁).moveLeft i) (-x₁) y₁ y₂) (hl : x₁ < x₂) :\n P3 x₁ x₂ y₁ y₂",
"end": [
419,
45
],
"full_name": "Surreal.Multiplication.P3_of_lt",
"kind": "commanddeclaration",
"start": [
410,
1
]
},
{
"code": "theorem main (a : Args) : a.Numeric → P124 a",
"end": [
448,
50
],
"full_name": "Surreal.Multiplication.main",
"kind": "commanddeclaration",
"start": [
421,
1
]
},
{
"code": "theorem Numeric.mul : Numeric (x * y)",
"end": [
459,
80
],
"full_name": "SetTheory.PGame.Numeric.mul",
"kind": "commanddeclaration",
"start": [
459,
1
]
},
{
"code": "theorem P24 : P24 x₁ x₂ y",
"end": [
461,
75
],
"full_name": "SetTheory.PGame.P24",
"kind": "commanddeclaration",
"start": [
461,
1
]
},
{
"code": "theorem Equiv.mul_congr_left (he : x₁ ≈ x₂) : x₁ * y ≈ x₂ * y",
"end": [
464,
47
],
"full_name": "SetTheory.PGame.Equiv.mul_congr_left",
"kind": "commanddeclaration",
"start": [
463,
1
]
},
{
"code": "theorem Equiv.mul_congr_right (he : y₁ ≈ y₂) : x * y₁ ≈ x * y₂",
"end": [
467,
92
],
"full_name": "SetTheory.PGame.Equiv.mul_congr_right",
"kind": "commanddeclaration",
"start": [
466,
1
]
},
{
"code": "theorem Equiv.mul_congr (hx : x₁ ≈ x₂) (hy : y₁ ≈ y₂) : x₁ * y₁ ≈ x₂ * y₂",
"end": [
470,
74
],
"full_name": "SetTheory.PGame.Equiv.mul_congr",
"kind": "commanddeclaration",
"start": [
469,
1
]
},
{
"code": "theorem P3_of_lt_of_lt (hx : x₁ < x₂) (hy : y₁ < y₂) : P3 x₁ x₂ y₁ y₂",
"end": [
489,
72
],
"full_name": "SetTheory.PGame.P3_of_lt_of_lt",
"kind": "commanddeclaration",
"start": [
474,
1
]
},
{
"code": "theorem Numeric.mul_pos (hp₁ : 0 < x₁) (hp₂ : 0 < x₂) : 0 < x₁ * x₂",
"end": [
495,
13
],
"full_name": "SetTheory.PGame.Numeric.mul_pos",
"kind": "commanddeclaration",
"start": [
491,
1
]
}
] | 2 | Surreal.Multiplication.P3_neg | [
[
105,
57
],
[
108,
10
]
] | 1 | 3 | rw [← _root_.neg_lt_neg_iff] | x x₁ x₂ x₃ x' y y₁ y₂ y₃ y' : PGame
⊢ ⟦x₁ * y₂⟧ + ⟦x₂ * y₁⟧ < ⟦x₁ * y₁⟧ + ⟦x₂ * y₂⟧ ↔ -⟦x₂ * y₂⟧ + -⟦x₁ * y₁⟧ < -⟦x₂ * y₁⟧ + -⟦x₁ * y₂⟧ | x x₁ x₂ x₃ x' y y₁ y₂ y₃ y' : PGame
⊢ -(⟦x₁ * y₁⟧ + ⟦x₂ * y₂⟧) < -(⟦x₁ * y₂⟧ + ⟦x₂ * y₁⟧) ↔ -⟦x₂ * y₂⟧ + -⟦x₁ * y₁⟧ < -⟦x₂ * y₁⟧ + -⟦x₁ * y₂⟧ |
Mathlib/SetTheory/Surreal/Multiplication.lean | [
[
"Mathlib.SetTheory.Surreal.Basic",
"Mathlib/SetTheory/Surreal/Basic.lean"
],
[
"Mathlib.Logic.Hydra",
"Mathlib/Logic/Hydra.lean"
],
[
"Init",
".lake/packages/lean4/src/lean/Init.lean"
]
] | [
{
"code": "def P1 (x₁ x₂ x₃ y₁ y₂ y₃ : PGame) :=\n ⟦x₁ * y₁⟧ + ⟦x₂ * y₂⟧ - ⟦x₁ * y₂⟧ < ⟦x₃ * y₁⟧ + ⟦x₂ * y₃⟧ - (⟦x₃ * y₃⟧ : Game)",
"end": [
74,
81
],
"full_name": "Surreal.Multiplication.P1",
"kind": "commanddeclaration",
"start": [
71,
1
]
},
{
"code": "def P2 (x₁ x₂ y : PGame) := x₁ ≈ x₂ → ⟦x₁ * y⟧ = (⟦x₂ * y⟧ : Game)",
"end": [
77,
67
],
"full_name": "Surreal.Multiplication.P2",
"kind": "commanddeclaration",
"start": [
76,
1
]
},
{
"code": "def P3 (x₁ x₂ y₁ y₂ : PGame) := ⟦x₁ * y₂⟧ + ⟦x₂ * y₁⟧ < ⟦x₁ * y₁⟧ + (⟦x₂ * y₂⟧ : Game)",
"end": [
80,
87
],
"full_name": "Surreal.Multiplication.P3",
"kind": "commanddeclaration",
"start": [
79,
1
]
},
{
"code": "def P4 (x₁ x₂ y : PGame) :=\n x₁ < x₂ → (∀ i, P3 x₁ x₂ (y.moveLeft i) y) ∧ ∀ j, P3 x₁ x₂ ((-y).moveLeft j) (-y)",
"end": [
87,
84
],
"full_name": "Surreal.Multiplication.P4",
"kind": "commanddeclaration",
"start": [
82,
1
]
},
{
"code": "def P24 (x₁ x₂ y : PGame) : Prop := P2 x₁ x₂ y ∧ P4 x₁ x₂ y",
"end": [
90,
60
],
"full_name": "Surreal.Multiplication.P24",
"kind": "commanddeclaration",
"start": [
89,
1
]
},
{
"code": "lemma P3_comm : P3 x₁ x₂ y₁ y₂ ↔ P3 y₁ y₂ x₁ x₂ := by\n rw [P3, P3, add_comm]\n congr! 2 <;> rw [quot_mul_comm]",
"end": [
98,
34
],
"full_name": "Surreal.Multiplication.P3_comm",
"kind": "lemma",
"start": [
96,
1
]
},
{
"code": "lemma P3.trans (h₁ : P3 x₁ x₂ y₁ y₂) (h₂ : P3 x₂ x₃ y₁ y₂) : P3 x₁ x₃ y₁ y₂ := by\n rw [P3] at h₁ h₂\n rw [P3, ← add_lt_add_iff_left (⟦x₂ * y₁⟧ + ⟦x₂ * y₂⟧)]\n convert add_lt_add h₁ h₂ using 1 <;> abel",
"end": [
103,
44
],
"full_name": "Surreal.Multiplication.P3.trans",
"kind": "lemma",
"start": [
100,
1
]
},
{
"code": "lemma P3_neg : P3 x₁ x₂ y₁ y₂ ↔ P3 (-x₂) (-x₁) y₁ y₂ := by\n simp_rw [P3, quot_neg_mul]\n rw [← _root_.neg_lt_neg_iff]\n abel_nf",
"end": [
108,
10
],
"full_name": "Surreal.Multiplication.P3_neg",
"kind": "lemma",
"start": [
105,
1
]
},
{
"code": "lemma P2_neg_left : P2 x₁ x₂ y ↔ P2 (-x₂) (-x₁) y := by\n rw [P2, P2]\n constructor\n · rw [quot_neg_mul, quot_neg_mul, eq_comm, neg_inj, neg_equiv_neg_iff, PGame.equiv_comm]\n exact (· ·)\n · rw [PGame.equiv_comm, neg_equiv_neg_iff, quot_neg_mul, quot_neg_mul, neg_inj, eq_comm]\n exact (· ·)",
"end": [
116,
16
],
"full_name": "Surreal.Multiplication.P2_neg_left",
"kind": "lemma",
"start": [
110,
1
]
},
{
"code": "lemma P2_neg_right : P2 x₁ x₂ y ↔ P2 x₁ x₂ (-y) := by\n rw [P2, P2, quot_mul_neg, quot_mul_neg, neg_inj]",
"end": [
119,
51
],
"full_name": "Surreal.Multiplication.P2_neg_right",
"kind": "lemma",
"start": [
118,
1
]
},
{
"code": "lemma P4_neg_left : P4 x₁ x₂ y ↔ P4 (-x₂) (-x₁) y := by\n simp_rw [P4, PGame.neg_lt_neg_iff, moveLeft_neg', ← P3_neg]",
"end": [
122,
62
],
"full_name": "Surreal.Multiplication.P4_neg_left",
"kind": "lemma",
"start": [
121,
1
]
},
{
"code": "lemma P4_neg_right : P4 x₁ x₂ y ↔ P4 x₁ x₂ (-y) := by\n rw [P4, P4, neg_neg, and_comm]",
"end": [
125,
33
],
"full_name": "Surreal.Multiplication.P4_neg_right",
"kind": "lemma",
"start": [
124,
1
]
},
{
"code": "lemma P24_neg_left : P24 x₁ x₂ y ↔ P24 (-x₂) (-x₁) y := by rw [P24, P24, P2_neg_left, P4_neg_left]",
"end": [
127,
99
],
"full_name": "Surreal.Multiplication.P24_neg_left",
"kind": "lemma",
"start": [
127,
1
]
},
{
"code": "lemma P24_neg_right : P24 x₁ x₂ y ↔ P24 x₁ x₂ (-y) := by rw [P24, P24, P2_neg_right, P4_neg_right]",
"end": [
128,
99
],
"full_name": "Surreal.Multiplication.P24_neg_right",
"kind": "lemma",
"start": [
128,
1
]
},
{
"code": "lemma mulOption_lt_iff_P1 {i j k l} :\n (⟦mulOption x y i k⟧ : Game) < -⟦mulOption x (-y) j l⟧ ↔\n P1 (x.moveLeft i) x (x.moveLeft j) y (y.moveLeft k) (-(-y).moveLeft l) := by\n dsimp only [P1, mulOption, quot_sub, quot_add]\n simp_rw [neg_sub', neg_add, quot_mul_neg, neg_neg]",
"end": [
136,
53
],
"full_name": "Surreal.Multiplication.mulOption_lt_iff_P1",
"kind": "lemma",
"start": [
132,
1
]
},
{
"code": "lemma mulOption_lt_mul_iff_P3 {i j} :\n ⟦mulOption x y i j⟧ < (⟦x * y⟧ : Game) ↔ P3 (x.moveLeft i) x (y.moveLeft j) y := by\n dsimp only [mulOption, quot_sub, quot_add]\n exact sub_lt_iff_lt_add'",
"end": [
141,
27
],
"full_name": "Surreal.Multiplication.mulOption_lt_mul_iff_P3",
"kind": "lemma",
"start": [
138,
1
]
},
{
"code": "lemma P1_of_eq (he : x₁ ≈ x₃) (h₁ : P2 x₁ x₃ y₁) (h₃ : P2 x₁ x₃ y₃) (h3 : P3 x₁ x₂ y₂ y₃) :\n P1 x₁ x₂ x₃ y₁ y₂ y₃ := by\n rw [P1, ← h₁ he, ← h₃ he, sub_lt_sub_iff]\n convert add_lt_add_left h3 ⟦x₁ * y₁⟧ using 1 <;> abel",
"end": [
146,
56
],
"full_name": "Surreal.Multiplication.P1_of_eq",
"kind": "lemma",
"start": [
143,
1
]
},
{
"code": "lemma P1_of_lt (h₁ : P3 x₃ x₂ y₂ y₃) (h₂ : P3 x₁ x₃ y₂ y₁) : P1 x₁ x₂ x₃ y₁ y₂ y₃ := by\n rw [P1, sub_lt_sub_iff, ← add_lt_add_iff_left ⟦x₃ * y₂⟧]\n convert add_lt_add h₁ h₂ using 1 <;> abel",
"end": [
150,
44
],
"full_name": "Surreal.Multiplication.P1_of_lt",
"kind": "lemma",
"start": [
148,
1
]
},
{
"code": "inductive Args : Type (u+1)\n | P1 (x y : PGame.{u}) : Args\n | P24 (x₁ x₂ y : PGame.{u}) : Args",
"end": [
155,
37
],
"full_name": "Surreal.Multiplication.Args",
"kind": "commanddeclaration",
"start": [
152,
1
]
},
{
"code": "def Args.toMultiset : Args → Multiset PGame\n | (Args.P1 x y) => {x, y}\n | (Args.P24 x₁ x₂ y) => {x₁, x₂, y}",
"end": [
160,
38
],
"full_name": "Surreal.Multiplication.Args.toMultiset",
"kind": "commanddeclaration",
"start": [
157,
1
]
},
{
"code": "def Args.Numeric (a : Args) := ∀ x ∈ a.toMultiset, SetTheory.PGame.Numeric x",
"end": [
163,
77
],
"full_name": "Surreal.Multiplication.Args.Numeric",
"kind": "commanddeclaration",
"start": [
162,
1
]
},
{
"code": "lemma Args.numeric_P1 {x y} : (Args.P1 x y).Numeric ↔ x.Numeric ∧ y.Numeric := by\n simp [Args.Numeric, Args.toMultiset]",
"end": [
166,
39
],
"full_name": "Surreal.Multiplication.Args.numeric_P1",
"kind": "lemma",
"start": [
165,
1
]
},
{
"code": "lemma Args.numeric_P24 {x₁ x₂ y} :\n (Args.P24 x₁ x₂ y).Numeric ↔ x₁.Numeric ∧ x₂.Numeric ∧ y.Numeric := by\n simp [Args.Numeric, Args.toMultiset]",
"end": [
170,
39
],
"full_name": "Surreal.Multiplication.Args.numeric_P24",
"kind": "lemma",
"start": [
168,
1
]
},
{
"code": "def ArgsRel := InvImage (TransGen <| CutExpand IsOption) Args.toMultiset",
"end": [
177,
73
],
"full_name": "Surreal.Multiplication.ArgsRel",
"kind": "commanddeclaration",
"start": [
174,
1
]
},
{
"code": "theorem argsRel_wf : WellFounded ArgsRel",
"end": [
180,
89
],
"full_name": "Surreal.Multiplication.argsRel_wf",
"kind": "commanddeclaration",
"start": [
179,
1
]
},
{
"code": "def P124 : Args → Prop\n | (Args.P1 x y) => Numeric (x * y)\n | (Args.P24 x₁ x₂ y) => P24 x₁ x₂ y",
"end": [
185,
38
],
"full_name": "Surreal.Multiplication.P124",
"kind": "commanddeclaration",
"start": [
182,
1
]
},
{
"code": "lemma ArgsRel.numeric_closed {a' a} : ArgsRel a' a → a.Numeric → a'.Numeric :=\n TransGen.closed' <| @cutExpand_closed _ IsOption ⟨wf_isOption.isIrrefl.1⟩ _ Numeric.isOption",
"end": [
189,
95
],
"full_name": "Surreal.Multiplication.ArgsRel.numeric_closed",
"kind": "lemma",
"start": [
187,
1
]
},
{
"code": "def IH1 (x y : PGame) : Prop :=\n ∀ ⦃x₁ x₂ y'⦄, IsOption x₁ x → IsOption x₂ x → (y' = y ∨ IsOption y' y) → P24 x₁ x₂ y'",
"end": [
193,
88
],
"full_name": "Surreal.Multiplication.IH1",
"kind": "commanddeclaration",
"start": [
191,
1
]
},
{
"code": "lemma ih1_neg_left : IH1 x y → IH1 (-x) y :=\n fun h x₁ x₂ y' h₁ h₂ hy ↦ by\n rw [isOption_neg] at h₁ h₂\n exact P24_neg_left.2 (h h₂ h₁ hy)",
"end": [
200,
38
],
"full_name": "Surreal.Multiplication.ih1_neg_left",
"kind": "lemma",
"start": [
197,
1
]
},
{
"code": "lemma ih1_neg_right : IH1 x y → IH1 x (-y) :=\n fun h x₁ x₂ y' ↦ by\n rw [← neg_eq_iff_eq_neg, isOption_neg, P24_neg_right]\n apply h",
"end": [
205,
12
],
"full_name": "Surreal.Multiplication.ih1_neg_right",
"kind": "lemma",
"start": [
202,
1
]
},
{
"code": "lemma numeric_option_mul (h : IsOption x' x) : (x' * y).Numeric :=\n ih (Args.P1 x' y) (TransGen.single <| cutExpand_pair_left h)",
"end": [
212,
63
],
"full_name": "Surreal.Multiplication.numeric_option_mul",
"kind": "lemma",
"start": [
211,
1
]
},
{
"code": "lemma numeric_mul_option (h : IsOption y' y) : (x * y').Numeric :=\n ih (Args.P1 x y') (TransGen.single <| cutExpand_pair_right h)",
"end": [
215,
64
],
"full_name": "Surreal.Multiplication.numeric_mul_option",
"kind": "lemma",
"start": [
214,
1
]
},
{
"code": "lemma numeric_option_mul_option (hx : IsOption x' x) (hy : IsOption y' y) : (x' * y').Numeric :=\n ih (Args.P1 x' y') ((TransGen.single <| cutExpand_pair_right hy).tail <| cutExpand_pair_left hx)",
"end": [
218,
99
],
"full_name": "Surreal.Multiplication.numeric_option_mul_option",
"kind": "lemma",
"start": [
217,
1
]
},
{
"code": "lemma ih1 : IH1 x y := by\n rintro x₁ x₂ y' h₁ h₂ (rfl|hy) <;> apply ih (Args.P24 _ _ _)\n on_goal 2 => refine TransGen.tail ?_ (cutExpand_pair_right hy)\n all_goals exact TransGen.single (cutExpand_double_left h₁ h₂)",
"end": [
223,
64
],
"full_name": "Surreal.Multiplication.ih1",
"kind": "lemma",
"start": [
220,
1
]
},
{
"code": "lemma ih1_swap : IH1 y x := ih1 <| by\n simp_rw [ArgsRel, InvImage, Args.toMultiset, Multiset.pair_comm] at ih ⊢\n exact ih",
"end": [
227,
11
],
"full_name": "Surreal.Multiplication.ih1_swap",
"kind": "lemma",
"start": [
225,
1
]
},
{
"code": "lemma P3_of_ih (hy : Numeric y) (ihyx : IH1 y x) (i k l) :\n P3 (x.moveLeft i) x (y.moveLeft k) (-(-y).moveLeft l) :=\n P3_comm.2 <| ((ihyx (IsOption.moveLeft k) (isOption_neg.1 <| .moveLeft l) <| Or.inl rfl).2\n (by rw [← moveRight_neg_symm]; apply hy.left_lt_right)).1 i",
"end": [
232,
64
],
"full_name": "Surreal.Multiplication.P3_of_ih",
"kind": "lemma",
"start": [
229,
1
]
},
{
"code": "lemma P24_of_ih (ihxy : IH1 x y) (i j) : P24 (x.moveLeft i) (x.moveLeft j) y :=\n ihxy (IsOption.moveLeft i) (IsOption.moveLeft j) (Or.inl rfl)",
"end": [
235,
64
],
"full_name": "Surreal.Multiplication.P24_of_ih",
"kind": "lemma",
"start": [
234,
1
]
},
{
"code": "lemma mulOption_lt_of_lt (i j k l) (h : x.moveLeft i < x.moveLeft j) :\n (⟦mulOption x y i k⟧ : Game) < -⟦mulOption x (-y) j l⟧ :=\n mulOption_lt_iff_P1.2 <| P1_of_lt (P3_of_ih hy ihyx j k l) <| ((P24_of_ih ihxy i j).2 h).1 k",
"end": [
245,
95
],
"full_name": "Surreal.Multiplication.mulOption_lt_of_lt",
"kind": "lemma",
"start": [
243,
1
]
},
{
"code": "lemma mulOption_lt (i j k l) : (⟦mulOption x y i k⟧ : Game) < -⟦mulOption x (-y) j l⟧ := by\n obtain (h|h|h) := lt_or_equiv_or_gt (hx.moveLeft i) (hx.moveLeft j)\n · exact mulOption_lt_of_lt hy ihxy ihyx i j k l h\n · have ml := @IsOption.moveLeft\n exact mulOption_lt_iff_P1.2 (P1_of_eq h (P24_of_ih ihxy i j).1\n (ihxy (ml i) (ml j) <| Or.inr <| isOption_neg.1 <| ml l).1 <| P3_of_ih hy ihyx i k l)\n · rw [mulOption_neg_neg, lt_neg]\n exact mulOption_lt_of_lt hy.neg (ih1_neg_right ihxy) (ih1_neg_left ihyx) j i l _ h",
"end": [
254,
87
],
"full_name": "Surreal.Multiplication.mulOption_lt",
"kind": "lemma",
"start": [
247,
1
]
},
{
"code": "theorem P1_of_ih : (x * y).Numeric",
"end": [
281,
56
],
"full_name": "Surreal.Multiplication.P1_of_ih",
"kind": "commanddeclaration",
"start": [
258,
1
]
},
{
"code": "def IH24 (x₁ x₂ y : PGame) : Prop :=\n ∀ ⦃z⦄, (IsOption z x₁ → P24 z x₂ y) ∧ (IsOption z x₂ → P24 x₁ z y) ∧ (IsOption z y → P24 x₁ x₂ z)",
"end": [
285,
100
],
"full_name": "Surreal.Multiplication.IH24",
"kind": "commanddeclaration",
"start": [
283,
1
]
},
{
"code": "def IH4 (x₁ x₂ y : PGame) : Prop :=\n ∀ ⦃z w⦄, IsOption w y → (IsOption z x₁ → P2 z x₂ w) ∧ (IsOption z x₂ → P2 x₁ z w)",
"end": [
289,
84
],
"full_name": "Surreal.Multiplication.IH4",
"kind": "commanddeclaration",
"start": [
287,
1
]
},
{
"code": "lemma ih₁₂ : IH24 x₁ x₂ y := by\n rw [IH24]\n refine fun z ↦ ⟨?_, ?_, ?_⟩ <;>\n refine fun h ↦ ih' (Args.P24 _ _ _) (TransGen.single ?_)\n · exact (cutExpand_add_right {y}).2 (cutExpand_pair_left h)\n · exact (cutExpand_add_left {x₁}).2 (cutExpand_pair_left h)\n · exact (cutExpand_add_left {x₁}).2 (cutExpand_pair_right h)",
"end": [
301,
63
],
"full_name": "Surreal.Multiplication.ih₁₂",
"kind": "lemma",
"start": [
295,
1
]
},
{
"code": "lemma ih₂₁ : IH24 x₂ x₁ y := ih₁₂ <| by\n simp_rw [ArgsRel, InvImage, Args.toMultiset, Multiset.pair_comm] at ih' ⊢\n suffices {x₁, y, x₂} = {x₂, y, x₁} by rwa [← this]\n dsimp only [Multiset.insert_eq_cons, ← Multiset.singleton_add] at ih' ⊢\n abel",
"end": [
307,
7
],
"full_name": "Surreal.Multiplication.ih₂₁",
"kind": "lemma",
"start": [
303,
1
]
},
{
"code": "lemma ih4 : IH4 x₁ x₂ y := by\n refine fun z w h ↦ ⟨?_, ?_⟩\n all_goals\n intro h'\n apply (ih' (Args.P24 _ _ _) <| (TransGen.single _).tail <|\n (cutExpand_add_left {x₁}).2 <| cutExpand_pair_right h).1\n try exact (cutExpand_add_right {w}).2 <| cutExpand_pair_left h'\n try exact (cutExpand_add_right {w}).2 <| cutExpand_pair_right h'",
"end": [
316,
69
],
"full_name": "Surreal.Multiplication.ih4",
"kind": "lemma",
"start": [
309,
1
]
},
{
"code": "lemma numeric_of_ih : (x₁ * y).Numeric ∧ (x₂ * y).Numeric := by\n constructor <;> refine ih' (Args.P1 _ _) (TransGen.single ?_)\n · exact (cutExpand_add_right {y}).2 <| (cutExpand_add_left {x₁}).2 cutExpand_zero\n · exact (cutExpand_add_right {x₂, y}).2 cutExpand_zero",
"end": [
321,
57
],
"full_name": "Surreal.Multiplication.numeric_of_ih",
"kind": "lemma",
"start": [
318,
1
]
},
{
"code": "lemma ih24_neg : IH24 x₁ x₂ y → IH24 (-x₂) (-x₁) y ∧ IH24 x₁ x₂ (-y) := by\n simp_rw [IH24, ← P24_neg_right, isOption_neg]\n refine fun h ↦ ⟨fun z ↦ ⟨?_, ?_, ?_⟩,\n fun z ↦ ⟨(@h z).1, (@h z).2.1, P24_neg_right.2 ∘ (@h <| -z).2.2⟩⟩\n all_goals\n rw [P24_neg_left]\n simp only [neg_neg]\n first | exact (@h <| -z).2.1 | exact (@h <| -z).1 | exact (@h z).2.2",
"end": [
331,
73
],
"full_name": "Surreal.Multiplication.ih24_neg",
"kind": "lemma",
"start": [
323,
1
]
},
{
"code": "lemma ih4_neg : IH4 x₁ x₂ y → IH4 (-x₂) (-x₁) y ∧ IH4 x₁ x₂ (-y) := by\n simp_rw [IH4, isOption_neg]\n refine fun h ↦ ⟨fun z w h' ↦ ?_, fun z w h' ↦ ?_⟩\n · convert (h h').symm using 2 <;> rw [P2_neg_left, neg_neg]\n · convert h h' using 2 <;> rw [P2_neg_right]",
"end": [
338,
47
],
"full_name": "Surreal.Multiplication.ih4_neg",
"kind": "lemma",
"start": [
333,
1
]
},
{
"code": "lemma mulOption_lt_mul_of_equiv (hn : x₁.Numeric) (h : IH24 x₁ x₂ y) (he : x₁ ≈ x₂) (i j) :\n ⟦mulOption x₁ y i j⟧ < (⟦x₂ * y⟧ : Game) := by\n convert sub_lt_iff_lt_add'.2 ((((@h _).1 <| IsOption.moveLeft i).2 _).1 j) using 1\n · rw [← ((@h _).2.2 <| IsOption.moveLeft j).1 he]\n rfl\n · rw [← lt_congr_right he]\n apply hn.moveLeft_lt",
"end": [
346,
25
],
"full_name": "Surreal.Multiplication.mulOption_lt_mul_of_equiv",
"kind": "lemma",
"start": [
340,
1
]
},
{
"code": "theorem mul_right_le_of_equiv (h₁ : x₁.Numeric) (h₂ : x₂.Numeric)\n (h₁₂ : IH24 x₁ x₂ y) (h₂₁ : IH24 x₂ x₁ y) (he : x₁ ≈ x₂) : x₁ * y ≤ x₂ * y",
"end": [
362,
73
],
"full_name": "Surreal.Multiplication.mul_right_le_of_equiv",
"kind": "commanddeclaration",
"start": [
348,
1
]
},
{
"code": "def MulOptionsLTMul (x y : PGame) : Prop := ∀ ⦃i j⦄, ⟦mulOption x y i j⟧ < (⟦x * y⟧ : Game)",
"end": [
365,
92
],
"full_name": "Surreal.Multiplication.MulOptionsLTMul",
"kind": "commanddeclaration",
"start": [
364,
1
]
},
{
"code": "lemma mulOptionsLTMul_of_numeric (hn : (x * y).Numeric) :\n (MulOptionsLTMul x y ∧ MulOptionsLTMul (-x) (-y)) ∧\n (MulOptionsLTMul x (-y) ∧ MulOptionsLTMul (-x) y) := by\n constructor\n · have h := hn.moveLeft_lt\n simp_rw [lt_iff_game_lt] at h\n convert (leftMoves_mul_iff <| GT.gt _).1 h\n rw [← quot_neg_mul_neg]\n rfl\n · have h := hn.lt_moveRight\n simp_rw [lt_iff_game_lt, rightMoves_mul_iff] at h\n refine h.imp ?_ ?_ <;> refine forall₂_imp fun a b ↦ ?_\n all_goals\n rw [lt_neg]\n first | rw [quot_mul_neg] | rw [quot_neg_mul]\n exact id",
"end": [
386,
15
],
"full_name": "Surreal.Multiplication.mulOptionsLTMul_of_numeric",
"kind": "lemma",
"start": [
367,
1
]
},
{
"code": "def IH3 (x₁ x' x₂ y₁ y₂ : PGame) : Prop :=\n P2 x₁ x' y₁ ∧ P2 x₁ x' y₂ ∧ P3 x' x₂ y₁ y₂ ∧ (x₁ < x' → P3 x₁ x' y₁ y₂)",
"end": [
395,
76
],
"full_name": "Surreal.Multiplication.IH3",
"kind": "commanddeclaration",
"start": [
388,
1
]
},
{
"code": "lemma ih3_of_ih (h24 : IH24 x₁ x₂ y) (h4 : IH4 x₁ x₂ y) (hl : MulOptionsLTMul x₂ y) (i j) :\n IH3 x₁ (x₂.moveLeft i) x₂ (y.moveLeft j) y :=\n have ml := @IsOption.moveLeft\n have h24 := (@h24 _).2.1 (ml i)\n ⟨(h4 <| ml j).2 (ml i), h24.1, mulOption_lt_mul_iff_P3.1 (@hl i j), fun l ↦ (h24.2 l).1 _⟩",
"end": [
401,
93
],
"full_name": "Surreal.Multiplication.ih3_of_ih",
"kind": "lemma",
"start": [
397,
1
]
},
{
"code": "lemma P3_of_le_left {y₁ y₂} (i) (h : IH3 x₁ (x₂.moveLeft i) x₂ y₁ y₂) (hl : x₁ ≤ x₂.moveLeft i) :\n P3 x₁ x₂ y₁ y₂ := by\n obtain (hl|he) := lt_or_equiv_of_le hl\n · exact (h.2.2.2 hl).trans h.2.2.1\n · rw [P3, h.1 he, h.2.1 he]\n exact h.2.2.1",
"end": [
408,
18
],
"full_name": "Surreal.Multiplication.P3_of_le_left",
"kind": "lemma",
"start": [
403,
1
]
},
{
"code": "theorem P3_of_lt {y₁ y₂} (h : ∀ i, IH3 x₁ (x₂.moveLeft i) x₂ y₁ y₂)\n (hs : ∀ i, IH3 (-x₂) ((-x₁).moveLeft i) (-x₁) y₁ y₂) (hl : x₁ < x₂) :\n P3 x₁ x₂ y₁ y₂",
"end": [
419,
45
],
"full_name": "Surreal.Multiplication.P3_of_lt",
"kind": "commanddeclaration",
"start": [
410,
1
]
},
{
"code": "theorem main (a : Args) : a.Numeric → P124 a",
"end": [
448,
50
],
"full_name": "Surreal.Multiplication.main",
"kind": "commanddeclaration",
"start": [
421,
1
]
},
{
"code": "theorem Numeric.mul : Numeric (x * y)",
"end": [
459,
80
],
"full_name": "SetTheory.PGame.Numeric.mul",
"kind": "commanddeclaration",
"start": [
459,
1
]
},
{
"code": "theorem P24 : P24 x₁ x₂ y",
"end": [
461,
75
],
"full_name": "SetTheory.PGame.P24",
"kind": "commanddeclaration",
"start": [
461,
1
]
},
{
"code": "theorem Equiv.mul_congr_left (he : x₁ ≈ x₂) : x₁ * y ≈ x₂ * y",
"end": [
464,
47
],
"full_name": "SetTheory.PGame.Equiv.mul_congr_left",
"kind": "commanddeclaration",
"start": [
463,
1
]
},
{
"code": "theorem Equiv.mul_congr_right (he : y₁ ≈ y₂) : x * y₁ ≈ x * y₂",
"end": [
467,
92
],
"full_name": "SetTheory.PGame.Equiv.mul_congr_right",
"kind": "commanddeclaration",
"start": [
466,
1
]
},
{
"code": "theorem Equiv.mul_congr (hx : x₁ ≈ x₂) (hy : y₁ ≈ y₂) : x₁ * y₁ ≈ x₂ * y₂",
"end": [
470,
74
],
"full_name": "SetTheory.PGame.Equiv.mul_congr",
"kind": "commanddeclaration",
"start": [
469,
1
]
},
{
"code": "theorem P3_of_lt_of_lt (hx : x₁ < x₂) (hy : y₁ < y₂) : P3 x₁ x₂ y₁ y₂",
"end": [
489,
72
],
"full_name": "SetTheory.PGame.P3_of_lt_of_lt",
"kind": "commanddeclaration",
"start": [
474,
1
]
},
{
"code": "theorem Numeric.mul_pos (hp₁ : 0 < x₁) (hp₂ : 0 < x₂) : 0 < x₁ * x₂",
"end": [
495,
13
],
"full_name": "SetTheory.PGame.Numeric.mul_pos",
"kind": "commanddeclaration",
"start": [
491,
1
]
}
] | 2 | Surreal.Multiplication.P3_neg | [
[
105,
57
],
[
108,
10
]
] | 2 | 3 | abel_nf | x x₁ x₂ x₃ x' y y₁ y₂ y₃ y' : PGame
⊢ -(⟦x₁ * y₁⟧ + ⟦x₂ * y₂⟧) < -(⟦x₁ * y₂⟧ + ⟦x₂ * y₁⟧) ↔ -⟦x₂ * y₂⟧ + -⟦x₁ * y₁⟧ < -⟦x₂ * y₁⟧ + -⟦x₁ * y₂⟧ | no goals |
Mathlib/SetTheory/Surreal/Multiplication.lean | [
[
"Mathlib.SetTheory.Surreal.Basic",
"Mathlib/SetTheory/Surreal/Basic.lean"
],
[
"Mathlib.Logic.Hydra",
"Mathlib/Logic/Hydra.lean"
],
[
"Init",
".lake/packages/lean4/src/lean/Init.lean"
]
] | [
{
"code": "def P1 (x₁ x₂ x₃ y₁ y₂ y₃ : PGame) :=\n ⟦x₁ * y₁⟧ + ⟦x₂ * y₂⟧ - ⟦x₁ * y₂⟧ < ⟦x₃ * y₁⟧ + ⟦x₂ * y₃⟧ - (⟦x₃ * y₃⟧ : Game)",
"end": [
74,
81
],
"full_name": "Surreal.Multiplication.P1",
"kind": "commanddeclaration",
"start": [
71,
1
]
},
{
"code": "def P2 (x₁ x₂ y : PGame) := x₁ ≈ x₂ → ⟦x₁ * y⟧ = (⟦x₂ * y⟧ : Game)",
"end": [
77,
67
],
"full_name": "Surreal.Multiplication.P2",
"kind": "commanddeclaration",
"start": [
76,
1
]
},
{
"code": "def P3 (x₁ x₂ y₁ y₂ : PGame) := ⟦x₁ * y₂⟧ + ⟦x₂ * y₁⟧ < ⟦x₁ * y₁⟧ + (⟦x₂ * y₂⟧ : Game)",
"end": [
80,
87
],
"full_name": "Surreal.Multiplication.P3",
"kind": "commanddeclaration",
"start": [
79,
1
]
},
{
"code": "def P4 (x₁ x₂ y : PGame) :=\n x₁ < x₂ → (∀ i, P3 x₁ x₂ (y.moveLeft i) y) ∧ ∀ j, P3 x₁ x₂ ((-y).moveLeft j) (-y)",
"end": [
87,
84
],
"full_name": "Surreal.Multiplication.P4",
"kind": "commanddeclaration",
"start": [
82,
1
]
},
{
"code": "def P24 (x₁ x₂ y : PGame) : Prop := P2 x₁ x₂ y ∧ P4 x₁ x₂ y",
"end": [
90,
60
],
"full_name": "Surreal.Multiplication.P24",
"kind": "commanddeclaration",
"start": [
89,
1
]
},
{
"code": "lemma P3_comm : P3 x₁ x₂ y₁ y₂ ↔ P3 y₁ y₂ x₁ x₂ := by\n rw [P3, P3, add_comm]\n congr! 2 <;> rw [quot_mul_comm]",
"end": [
98,
34
],
"full_name": "Surreal.Multiplication.P3_comm",
"kind": "lemma",
"start": [
96,
1
]
},
{
"code": "lemma P3.trans (h₁ : P3 x₁ x₂ y₁ y₂) (h₂ : P3 x₂ x₃ y₁ y₂) : P3 x₁ x₃ y₁ y₂ := by\n rw [P3] at h₁ h₂\n rw [P3, ← add_lt_add_iff_left (⟦x₂ * y₁⟧ + ⟦x₂ * y₂⟧)]\n convert add_lt_add h₁ h₂ using 1 <;> abel",
"end": [
103,
44
],
"full_name": "Surreal.Multiplication.P3.trans",
"kind": "lemma",
"start": [
100,
1
]
},
{
"code": "lemma P3_neg : P3 x₁ x₂ y₁ y₂ ↔ P3 (-x₂) (-x₁) y₁ y₂ := by\n simp_rw [P3, quot_neg_mul]\n rw [← _root_.neg_lt_neg_iff]\n abel_nf",
"end": [
108,
10
],
"full_name": "Surreal.Multiplication.P3_neg",
"kind": "lemma",
"start": [
105,
1
]
},
{
"code": "lemma P2_neg_left : P2 x₁ x₂ y ↔ P2 (-x₂) (-x₁) y := by\n rw [P2, P2]\n constructor\n · rw [quot_neg_mul, quot_neg_mul, eq_comm, neg_inj, neg_equiv_neg_iff, PGame.equiv_comm]\n exact (· ·)\n · rw [PGame.equiv_comm, neg_equiv_neg_iff, quot_neg_mul, quot_neg_mul, neg_inj, eq_comm]\n exact (· ·)",
"end": [
116,
16
],
"full_name": "Surreal.Multiplication.P2_neg_left",
"kind": "lemma",
"start": [
110,
1
]
},
{
"code": "lemma P2_neg_right : P2 x₁ x₂ y ↔ P2 x₁ x₂ (-y) := by\n rw [P2, P2, quot_mul_neg, quot_mul_neg, neg_inj]",
"end": [
119,
51
],
"full_name": "Surreal.Multiplication.P2_neg_right",
"kind": "lemma",
"start": [
118,
1
]
},
{
"code": "lemma P4_neg_left : P4 x₁ x₂ y ↔ P4 (-x₂) (-x₁) y := by\n simp_rw [P4, PGame.neg_lt_neg_iff, moveLeft_neg', ← P3_neg]",
"end": [
122,
62
],
"full_name": "Surreal.Multiplication.P4_neg_left",
"kind": "lemma",
"start": [
121,
1
]
},
{
"code": "lemma P4_neg_right : P4 x₁ x₂ y ↔ P4 x₁ x₂ (-y) := by\n rw [P4, P4, neg_neg, and_comm]",
"end": [
125,
33
],
"full_name": "Surreal.Multiplication.P4_neg_right",
"kind": "lemma",
"start": [
124,
1
]
},
{
"code": "lemma P24_neg_left : P24 x₁ x₂ y ↔ P24 (-x₂) (-x₁) y := by rw [P24, P24, P2_neg_left, P4_neg_left]",
"end": [
127,
99
],
"full_name": "Surreal.Multiplication.P24_neg_left",
"kind": "lemma",
"start": [
127,
1
]
},
{
"code": "lemma P24_neg_right : P24 x₁ x₂ y ↔ P24 x₁ x₂ (-y) := by rw [P24, P24, P2_neg_right, P4_neg_right]",
"end": [
128,
99
],
"full_name": "Surreal.Multiplication.P24_neg_right",
"kind": "lemma",
"start": [
128,
1
]
},
{
"code": "lemma mulOption_lt_iff_P1 {i j k l} :\n (⟦mulOption x y i k⟧ : Game) < -⟦mulOption x (-y) j l⟧ ↔\n P1 (x.moveLeft i) x (x.moveLeft j) y (y.moveLeft k) (-(-y).moveLeft l) := by\n dsimp only [P1, mulOption, quot_sub, quot_add]\n simp_rw [neg_sub', neg_add, quot_mul_neg, neg_neg]",
"end": [
136,
53
],
"full_name": "Surreal.Multiplication.mulOption_lt_iff_P1",
"kind": "lemma",
"start": [
132,
1
]
},
{
"code": "lemma mulOption_lt_mul_iff_P3 {i j} :\n ⟦mulOption x y i j⟧ < (⟦x * y⟧ : Game) ↔ P3 (x.moveLeft i) x (y.moveLeft j) y := by\n dsimp only [mulOption, quot_sub, quot_add]\n exact sub_lt_iff_lt_add'",
"end": [
141,
27
],
"full_name": "Surreal.Multiplication.mulOption_lt_mul_iff_P3",
"kind": "lemma",
"start": [
138,
1
]
},
{
"code": "lemma P1_of_eq (he : x₁ ≈ x₃) (h₁ : P2 x₁ x₃ y₁) (h₃ : P2 x₁ x₃ y₃) (h3 : P3 x₁ x₂ y₂ y₃) :\n P1 x₁ x₂ x₃ y₁ y₂ y₃ := by\n rw [P1, ← h₁ he, ← h₃ he, sub_lt_sub_iff]\n convert add_lt_add_left h3 ⟦x₁ * y₁⟧ using 1 <;> abel",
"end": [
146,
56
],
"full_name": "Surreal.Multiplication.P1_of_eq",
"kind": "lemma",
"start": [
143,
1
]
},
{
"code": "lemma P1_of_lt (h₁ : P3 x₃ x₂ y₂ y₃) (h₂ : P3 x₁ x₃ y₂ y₁) : P1 x₁ x₂ x₃ y₁ y₂ y₃ := by\n rw [P1, sub_lt_sub_iff, ← add_lt_add_iff_left ⟦x₃ * y₂⟧]\n convert add_lt_add h₁ h₂ using 1 <;> abel",
"end": [
150,
44
],
"full_name": "Surreal.Multiplication.P1_of_lt",
"kind": "lemma",
"start": [
148,
1
]
},
{
"code": "inductive Args : Type (u+1)\n | P1 (x y : PGame.{u}) : Args\n | P24 (x₁ x₂ y : PGame.{u}) : Args",
"end": [
155,
37
],
"full_name": "Surreal.Multiplication.Args",
"kind": "commanddeclaration",
"start": [
152,
1
]
},
{
"code": "def Args.toMultiset : Args → Multiset PGame\n | (Args.P1 x y) => {x, y}\n | (Args.P24 x₁ x₂ y) => {x₁, x₂, y}",
"end": [
160,
38
],
"full_name": "Surreal.Multiplication.Args.toMultiset",
"kind": "commanddeclaration",
"start": [
157,
1
]
},
{
"code": "def Args.Numeric (a : Args) := ∀ x ∈ a.toMultiset, SetTheory.PGame.Numeric x",
"end": [
163,
77
],
"full_name": "Surreal.Multiplication.Args.Numeric",
"kind": "commanddeclaration",
"start": [
162,
1
]
},
{
"code": "lemma Args.numeric_P1 {x y} : (Args.P1 x y).Numeric ↔ x.Numeric ∧ y.Numeric := by\n simp [Args.Numeric, Args.toMultiset]",
"end": [
166,
39
],
"full_name": "Surreal.Multiplication.Args.numeric_P1",
"kind": "lemma",
"start": [
165,
1
]
},
{
"code": "lemma Args.numeric_P24 {x₁ x₂ y} :\n (Args.P24 x₁ x₂ y).Numeric ↔ x₁.Numeric ∧ x₂.Numeric ∧ y.Numeric := by\n simp [Args.Numeric, Args.toMultiset]",
"end": [
170,
39
],
"full_name": "Surreal.Multiplication.Args.numeric_P24",
"kind": "lemma",
"start": [
168,
1
]
},
{
"code": "def ArgsRel := InvImage (TransGen <| CutExpand IsOption) Args.toMultiset",
"end": [
177,
73
],
"full_name": "Surreal.Multiplication.ArgsRel",
"kind": "commanddeclaration",
"start": [
174,
1
]
},
{
"code": "theorem argsRel_wf : WellFounded ArgsRel",
"end": [
180,
89
],
"full_name": "Surreal.Multiplication.argsRel_wf",
"kind": "commanddeclaration",
"start": [
179,
1
]
},
{
"code": "def P124 : Args → Prop\n | (Args.P1 x y) => Numeric (x * y)\n | (Args.P24 x₁ x₂ y) => P24 x₁ x₂ y",
"end": [
185,
38
],
"full_name": "Surreal.Multiplication.P124",
"kind": "commanddeclaration",
"start": [
182,
1
]
},
{
"code": "lemma ArgsRel.numeric_closed {a' a} : ArgsRel a' a → a.Numeric → a'.Numeric :=\n TransGen.closed' <| @cutExpand_closed _ IsOption ⟨wf_isOption.isIrrefl.1⟩ _ Numeric.isOption",
"end": [
189,
95
],
"full_name": "Surreal.Multiplication.ArgsRel.numeric_closed",
"kind": "lemma",
"start": [
187,
1
]
},
{
"code": "def IH1 (x y : PGame) : Prop :=\n ∀ ⦃x₁ x₂ y'⦄, IsOption x₁ x → IsOption x₂ x → (y' = y ∨ IsOption y' y) → P24 x₁ x₂ y'",
"end": [
193,
88
],
"full_name": "Surreal.Multiplication.IH1",
"kind": "commanddeclaration",
"start": [
191,
1
]
},
{
"code": "lemma ih1_neg_left : IH1 x y → IH1 (-x) y :=\n fun h x₁ x₂ y' h₁ h₂ hy ↦ by\n rw [isOption_neg] at h₁ h₂\n exact P24_neg_left.2 (h h₂ h₁ hy)",
"end": [
200,
38
],
"full_name": "Surreal.Multiplication.ih1_neg_left",
"kind": "lemma",
"start": [
197,
1
]
},
{
"code": "lemma ih1_neg_right : IH1 x y → IH1 x (-y) :=\n fun h x₁ x₂ y' ↦ by\n rw [← neg_eq_iff_eq_neg, isOption_neg, P24_neg_right]\n apply h",
"end": [
205,
12
],
"full_name": "Surreal.Multiplication.ih1_neg_right",
"kind": "lemma",
"start": [
202,
1
]
},
{
"code": "lemma numeric_option_mul (h : IsOption x' x) : (x' * y).Numeric :=\n ih (Args.P1 x' y) (TransGen.single <| cutExpand_pair_left h)",
"end": [
212,
63
],
"full_name": "Surreal.Multiplication.numeric_option_mul",
"kind": "lemma",
"start": [
211,
1
]
},
{
"code": "lemma numeric_mul_option (h : IsOption y' y) : (x * y').Numeric :=\n ih (Args.P1 x y') (TransGen.single <| cutExpand_pair_right h)",
"end": [
215,
64
],
"full_name": "Surreal.Multiplication.numeric_mul_option",
"kind": "lemma",
"start": [
214,
1
]
},
{
"code": "lemma numeric_option_mul_option (hx : IsOption x' x) (hy : IsOption y' y) : (x' * y').Numeric :=\n ih (Args.P1 x' y') ((TransGen.single <| cutExpand_pair_right hy).tail <| cutExpand_pair_left hx)",
"end": [
218,
99
],
"full_name": "Surreal.Multiplication.numeric_option_mul_option",
"kind": "lemma",
"start": [
217,
1
]
},
{
"code": "lemma ih1 : IH1 x y := by\n rintro x₁ x₂ y' h₁ h₂ (rfl|hy) <;> apply ih (Args.P24 _ _ _)\n on_goal 2 => refine TransGen.tail ?_ (cutExpand_pair_right hy)\n all_goals exact TransGen.single (cutExpand_double_left h₁ h₂)",
"end": [
223,
64
],
"full_name": "Surreal.Multiplication.ih1",
"kind": "lemma",
"start": [
220,
1
]
},
{
"code": "lemma ih1_swap : IH1 y x := ih1 <| by\n simp_rw [ArgsRel, InvImage, Args.toMultiset, Multiset.pair_comm] at ih ⊢\n exact ih",
"end": [
227,
11
],
"full_name": "Surreal.Multiplication.ih1_swap",
"kind": "lemma",
"start": [
225,
1
]
},
{
"code": "lemma P3_of_ih (hy : Numeric y) (ihyx : IH1 y x) (i k l) :\n P3 (x.moveLeft i) x (y.moveLeft k) (-(-y).moveLeft l) :=\n P3_comm.2 <| ((ihyx (IsOption.moveLeft k) (isOption_neg.1 <| .moveLeft l) <| Or.inl rfl).2\n (by rw [← moveRight_neg_symm]; apply hy.left_lt_right)).1 i",
"end": [
232,
64
],
"full_name": "Surreal.Multiplication.P3_of_ih",
"kind": "lemma",
"start": [
229,
1
]
},
{
"code": "lemma P24_of_ih (ihxy : IH1 x y) (i j) : P24 (x.moveLeft i) (x.moveLeft j) y :=\n ihxy (IsOption.moveLeft i) (IsOption.moveLeft j) (Or.inl rfl)",
"end": [
235,
64
],
"full_name": "Surreal.Multiplication.P24_of_ih",
"kind": "lemma",
"start": [
234,
1
]
},
{
"code": "lemma mulOption_lt_of_lt (i j k l) (h : x.moveLeft i < x.moveLeft j) :\n (⟦mulOption x y i k⟧ : Game) < -⟦mulOption x (-y) j l⟧ :=\n mulOption_lt_iff_P1.2 <| P1_of_lt (P3_of_ih hy ihyx j k l) <| ((P24_of_ih ihxy i j).2 h).1 k",
"end": [
245,
95
],
"full_name": "Surreal.Multiplication.mulOption_lt_of_lt",
"kind": "lemma",
"start": [
243,
1
]
},
{
"code": "lemma mulOption_lt (i j k l) : (⟦mulOption x y i k⟧ : Game) < -⟦mulOption x (-y) j l⟧ := by\n obtain (h|h|h) := lt_or_equiv_or_gt (hx.moveLeft i) (hx.moveLeft j)\n · exact mulOption_lt_of_lt hy ihxy ihyx i j k l h\n · have ml := @IsOption.moveLeft\n exact mulOption_lt_iff_P1.2 (P1_of_eq h (P24_of_ih ihxy i j).1\n (ihxy (ml i) (ml j) <| Or.inr <| isOption_neg.1 <| ml l).1 <| P3_of_ih hy ihyx i k l)\n · rw [mulOption_neg_neg, lt_neg]\n exact mulOption_lt_of_lt hy.neg (ih1_neg_right ihxy) (ih1_neg_left ihyx) j i l _ h",
"end": [
254,
87
],
"full_name": "Surreal.Multiplication.mulOption_lt",
"kind": "lemma",
"start": [
247,
1
]
},
{
"code": "theorem P1_of_ih : (x * y).Numeric",
"end": [
281,
56
],
"full_name": "Surreal.Multiplication.P1_of_ih",
"kind": "commanddeclaration",
"start": [
258,
1
]
},
{
"code": "def IH24 (x₁ x₂ y : PGame) : Prop :=\n ∀ ⦃z⦄, (IsOption z x₁ → P24 z x₂ y) ∧ (IsOption z x₂ → P24 x₁ z y) ∧ (IsOption z y → P24 x₁ x₂ z)",
"end": [
285,
100
],
"full_name": "Surreal.Multiplication.IH24",
"kind": "commanddeclaration",
"start": [
283,
1
]
},
{
"code": "def IH4 (x₁ x₂ y : PGame) : Prop :=\n ∀ ⦃z w⦄, IsOption w y → (IsOption z x₁ → P2 z x₂ w) ∧ (IsOption z x₂ → P2 x₁ z w)",
"end": [
289,
84
],
"full_name": "Surreal.Multiplication.IH4",
"kind": "commanddeclaration",
"start": [
287,
1
]
},
{
"code": "lemma ih₁₂ : IH24 x₁ x₂ y := by\n rw [IH24]\n refine fun z ↦ ⟨?_, ?_, ?_⟩ <;>\n refine fun h ↦ ih' (Args.P24 _ _ _) (TransGen.single ?_)\n · exact (cutExpand_add_right {y}).2 (cutExpand_pair_left h)\n · exact (cutExpand_add_left {x₁}).2 (cutExpand_pair_left h)\n · exact (cutExpand_add_left {x₁}).2 (cutExpand_pair_right h)",
"end": [
301,
63
],
"full_name": "Surreal.Multiplication.ih₁₂",
"kind": "lemma",
"start": [
295,
1
]
},
{
"code": "lemma ih₂₁ : IH24 x₂ x₁ y := ih₁₂ <| by\n simp_rw [ArgsRel, InvImage, Args.toMultiset, Multiset.pair_comm] at ih' ⊢\n suffices {x₁, y, x₂} = {x₂, y, x₁} by rwa [← this]\n dsimp only [Multiset.insert_eq_cons, ← Multiset.singleton_add] at ih' ⊢\n abel",
"end": [
307,
7
],
"full_name": "Surreal.Multiplication.ih₂₁",
"kind": "lemma",
"start": [
303,
1
]
},
{
"code": "lemma ih4 : IH4 x₁ x₂ y := by\n refine fun z w h ↦ ⟨?_, ?_⟩\n all_goals\n intro h'\n apply (ih' (Args.P24 _ _ _) <| (TransGen.single _).tail <|\n (cutExpand_add_left {x₁}).2 <| cutExpand_pair_right h).1\n try exact (cutExpand_add_right {w}).2 <| cutExpand_pair_left h'\n try exact (cutExpand_add_right {w}).2 <| cutExpand_pair_right h'",
"end": [
316,
69
],
"full_name": "Surreal.Multiplication.ih4",
"kind": "lemma",
"start": [
309,
1
]
},
{
"code": "lemma numeric_of_ih : (x₁ * y).Numeric ∧ (x₂ * y).Numeric := by\n constructor <;> refine ih' (Args.P1 _ _) (TransGen.single ?_)\n · exact (cutExpand_add_right {y}).2 <| (cutExpand_add_left {x₁}).2 cutExpand_zero\n · exact (cutExpand_add_right {x₂, y}).2 cutExpand_zero",
"end": [
321,
57
],
"full_name": "Surreal.Multiplication.numeric_of_ih",
"kind": "lemma",
"start": [
318,
1
]
},
{
"code": "lemma ih24_neg : IH24 x₁ x₂ y → IH24 (-x₂) (-x₁) y ∧ IH24 x₁ x₂ (-y) := by\n simp_rw [IH24, ← P24_neg_right, isOption_neg]\n refine fun h ↦ ⟨fun z ↦ ⟨?_, ?_, ?_⟩,\n fun z ↦ ⟨(@h z).1, (@h z).2.1, P24_neg_right.2 ∘ (@h <| -z).2.2⟩⟩\n all_goals\n rw [P24_neg_left]\n simp only [neg_neg]\n first | exact (@h <| -z).2.1 | exact (@h <| -z).1 | exact (@h z).2.2",
"end": [
331,
73
],
"full_name": "Surreal.Multiplication.ih24_neg",
"kind": "lemma",
"start": [
323,
1
]
},
{
"code": "lemma ih4_neg : IH4 x₁ x₂ y → IH4 (-x₂) (-x₁) y ∧ IH4 x₁ x₂ (-y) := by\n simp_rw [IH4, isOption_neg]\n refine fun h ↦ ⟨fun z w h' ↦ ?_, fun z w h' ↦ ?_⟩\n · convert (h h').symm using 2 <;> rw [P2_neg_left, neg_neg]\n · convert h h' using 2 <;> rw [P2_neg_right]",
"end": [
338,
47
],
"full_name": "Surreal.Multiplication.ih4_neg",
"kind": "lemma",
"start": [
333,
1
]
},
{
"code": "lemma mulOption_lt_mul_of_equiv (hn : x₁.Numeric) (h : IH24 x₁ x₂ y) (he : x₁ ≈ x₂) (i j) :\n ⟦mulOption x₁ y i j⟧ < (⟦x₂ * y⟧ : Game) := by\n convert sub_lt_iff_lt_add'.2 ((((@h _).1 <| IsOption.moveLeft i).2 _).1 j) using 1\n · rw [← ((@h _).2.2 <| IsOption.moveLeft j).1 he]\n rfl\n · rw [← lt_congr_right he]\n apply hn.moveLeft_lt",
"end": [
346,
25
],
"full_name": "Surreal.Multiplication.mulOption_lt_mul_of_equiv",
"kind": "lemma",
"start": [
340,
1
]
},
{
"code": "theorem mul_right_le_of_equiv (h₁ : x₁.Numeric) (h₂ : x₂.Numeric)\n (h₁₂ : IH24 x₁ x₂ y) (h₂₁ : IH24 x₂ x₁ y) (he : x₁ ≈ x₂) : x₁ * y ≤ x₂ * y",
"end": [
362,
73
],
"full_name": "Surreal.Multiplication.mul_right_le_of_equiv",
"kind": "commanddeclaration",
"start": [
348,
1
]
},
{
"code": "def MulOptionsLTMul (x y : PGame) : Prop := ∀ ⦃i j⦄, ⟦mulOption x y i j⟧ < (⟦x * y⟧ : Game)",
"end": [
365,
92
],
"full_name": "Surreal.Multiplication.MulOptionsLTMul",
"kind": "commanddeclaration",
"start": [
364,
1
]
},
{
"code": "lemma mulOptionsLTMul_of_numeric (hn : (x * y).Numeric) :\n (MulOptionsLTMul x y ∧ MulOptionsLTMul (-x) (-y)) ∧\n (MulOptionsLTMul x (-y) ∧ MulOptionsLTMul (-x) y) := by\n constructor\n · have h := hn.moveLeft_lt\n simp_rw [lt_iff_game_lt] at h\n convert (leftMoves_mul_iff <| GT.gt _).1 h\n rw [← quot_neg_mul_neg]\n rfl\n · have h := hn.lt_moveRight\n simp_rw [lt_iff_game_lt, rightMoves_mul_iff] at h\n refine h.imp ?_ ?_ <;> refine forall₂_imp fun a b ↦ ?_\n all_goals\n rw [lt_neg]\n first | rw [quot_mul_neg] | rw [quot_neg_mul]\n exact id",
"end": [
386,
15
],
"full_name": "Surreal.Multiplication.mulOptionsLTMul_of_numeric",
"kind": "lemma",
"start": [
367,
1
]
},
{
"code": "def IH3 (x₁ x' x₂ y₁ y₂ : PGame) : Prop :=\n P2 x₁ x' y₁ ∧ P2 x₁ x' y₂ ∧ P3 x' x₂ y₁ y₂ ∧ (x₁ < x' → P3 x₁ x' y₁ y₂)",
"end": [
395,
76
],
"full_name": "Surreal.Multiplication.IH3",
"kind": "commanddeclaration",
"start": [
388,
1
]
},
{
"code": "lemma ih3_of_ih (h24 : IH24 x₁ x₂ y) (h4 : IH4 x₁ x₂ y) (hl : MulOptionsLTMul x₂ y) (i j) :\n IH3 x₁ (x₂.moveLeft i) x₂ (y.moveLeft j) y :=\n have ml := @IsOption.moveLeft\n have h24 := (@h24 _).2.1 (ml i)\n ⟨(h4 <| ml j).2 (ml i), h24.1, mulOption_lt_mul_iff_P3.1 (@hl i j), fun l ↦ (h24.2 l).1 _⟩",
"end": [
401,
93
],
"full_name": "Surreal.Multiplication.ih3_of_ih",
"kind": "lemma",
"start": [
397,
1
]
},
{
"code": "lemma P3_of_le_left {y₁ y₂} (i) (h : IH3 x₁ (x₂.moveLeft i) x₂ y₁ y₂) (hl : x₁ ≤ x₂.moveLeft i) :\n P3 x₁ x₂ y₁ y₂ := by\n obtain (hl|he) := lt_or_equiv_of_le hl\n · exact (h.2.2.2 hl).trans h.2.2.1\n · rw [P3, h.1 he, h.2.1 he]\n exact h.2.2.1",
"end": [
408,
18
],
"full_name": "Surreal.Multiplication.P3_of_le_left",
"kind": "lemma",
"start": [
403,
1
]
},
{
"code": "theorem P3_of_lt {y₁ y₂} (h : ∀ i, IH3 x₁ (x₂.moveLeft i) x₂ y₁ y₂)\n (hs : ∀ i, IH3 (-x₂) ((-x₁).moveLeft i) (-x₁) y₁ y₂) (hl : x₁ < x₂) :\n P3 x₁ x₂ y₁ y₂",
"end": [
419,
45
],
"full_name": "Surreal.Multiplication.P3_of_lt",
"kind": "commanddeclaration",
"start": [
410,
1
]
},
{
"code": "theorem main (a : Args) : a.Numeric → P124 a",
"end": [
448,
50
],
"full_name": "Surreal.Multiplication.main",
"kind": "commanddeclaration",
"start": [
421,
1
]
},
{
"code": "theorem Numeric.mul : Numeric (x * y)",
"end": [
459,
80
],
"full_name": "SetTheory.PGame.Numeric.mul",
"kind": "commanddeclaration",
"start": [
459,
1
]
},
{
"code": "theorem P24 : P24 x₁ x₂ y",
"end": [
461,
75
],
"full_name": "SetTheory.PGame.P24",
"kind": "commanddeclaration",
"start": [
461,
1
]
},
{
"code": "theorem Equiv.mul_congr_left (he : x₁ ≈ x₂) : x₁ * y ≈ x₂ * y",
"end": [
464,
47
],
"full_name": "SetTheory.PGame.Equiv.mul_congr_left",
"kind": "commanddeclaration",
"start": [
463,
1
]
},
{
"code": "theorem Equiv.mul_congr_right (he : y₁ ≈ y₂) : x * y₁ ≈ x * y₂",
"end": [
467,
92
],
"full_name": "SetTheory.PGame.Equiv.mul_congr_right",
"kind": "commanddeclaration",
"start": [
466,
1
]
},
{
"code": "theorem Equiv.mul_congr (hx : x₁ ≈ x₂) (hy : y₁ ≈ y₂) : x₁ * y₁ ≈ x₂ * y₂",
"end": [
470,
74
],
"full_name": "SetTheory.PGame.Equiv.mul_congr",
"kind": "commanddeclaration",
"start": [
469,
1
]
},
{
"code": "theorem P3_of_lt_of_lt (hx : x₁ < x₂) (hy : y₁ < y₂) : P3 x₁ x₂ y₁ y₂",
"end": [
489,
72
],
"full_name": "SetTheory.PGame.P3_of_lt_of_lt",
"kind": "commanddeclaration",
"start": [
474,
1
]
},
{
"code": "theorem Numeric.mul_pos (hp₁ : 0 < x₁) (hp₂ : 0 < x₂) : 0 < x₁ * x₂",
"end": [
495,
13
],
"full_name": "SetTheory.PGame.Numeric.mul_pos",
"kind": "commanddeclaration",
"start": [
491,
1
]
}
] | 3 | Surreal.Multiplication.P2_neg_left | [
[
110,
54
],
[
116,
16
]
] | 0 | 8 | rw [P2, P2] | x x₁ x₂ x₃ x' y y₁ y₂ y₃ y' : PGame
⊢ P2 x₁ x₂ y ↔ P2 (-x₂) (-x₁) y | x x₁ x₂ x₃ x' y y₁ y₂ y₃ y' : PGame
⊢ x₁ ≈ x₂ → ⟦x₁ * y⟧ = ⟦x₂ * y⟧ ↔ -x₂ ≈ -x₁ → ⟦-x₂ * y⟧ = ⟦-x₁ * y⟧ |
End of preview. Expand
in Data Studio
README.md exists but content is empty.
- Downloads last month
- 4