Lean / Reader
Lean reader

Verification.lean

1,268 lines263 declarationsno sorryimports Init
  1. import Init
  2. set_option maxHeartbeats 1000000
  3. set_option maxRecDepth 6000
  4. namespace Quaternary
  5. /-- Digit k allows an empty remainder via bit 0 and a nonempty remainder via bit 1. -/
  6. def reductions (code : List Nat) (h : Nat) : List Nat :=
  7. (List.range code.length).filterMap fun i =>
  8. let k := i + 1
  9. let d := code[i]!
  10. if (k = h ∧ d % 2 = 1) ∨ (k < h ∧ 2 ≤ d) then some (h-k) else none
  11. /-- Options on labeled heaps. A zero entry represents an absent heap. -/
  12. def options (code : List Nat) : List Nat → List (List Nat)
  13. | [] => []
  14. | h :: t => ((reductions code h).map (fun a => a :: t)) ++
  15. ((options code t).map (fun q => h :: q))
  16. /-- True means N (the player to move wins). A terminal position is N in misère play. -/
  17. inductive Outcome (code : List Nat) : List Nat → Bool → Prop where
  18. | terminal {p} (ht : options code p = []) : Outcome code p true
  19. | winning {p q} (hm : q ∈ options code p) (hq : Outcome code q false) : Outcome code p true
  20. | losing {p} (hn : options code p ≠ [])
  21. (hall : ∀ q, q ∈ options code p → Outcome code q true) : Outcome code p false
  22. theorem outcome_unique {c : List Nat} {p : List Nat} {a : Bool} (h : Outcome c p a) :
  23. ∀ {b}, Outcome c p b → a = b := by
  24. induction h with
  25. | terminal ht =>
  26. intro b other
  27. cases other with
  28. | terminal => rfl
  29. | winning => rfl
  30. | losing hn _ => exact False.elim (hn ht)
  31. | winning hm hq ih =>
  32. intro b other
  33. cases other with
  34. | terminal => rfl
  35. | winning => rfl
  36. | losing _ hall => exact False.elim (Bool.false_ne_true (ih (hall _ hm)))
  37. | losing hn hall ih =>
  38. intro b other
  39. cases other with
  40. | terminal ht => exact False.elim (hn ht)
  41. | winning hm hq => exact False.elim (Bool.false_ne_true (ih _ hm hq).symm)
  42. | losing => rfl
  43. private theorem s3122_0_0_0_0 : Outcome [3, 1, 2, 2] [0, 0, 0, 0] true := Outcome.terminal (by decide)
  44. private theorem s3122_0_1_0_0 : Outcome [3, 1, 2, 2] [0, 1, 0, 0] false := by
  45. apply Outcome.losing (by decide)
  46. intro q hq
  47. have eqs : options [3, 1, 2, 2] [0, 1, 0, 0] = [[0, 0, 0, 0]] := by decide
  48. rw [eqs] at hq
  49. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  50. subst q
  51. exact s3122_0_0_0_0
  52. private theorem s3122_0_1_0_2 : Outcome [3, 1, 2, 2] [0, 1, 0, 2] true := Outcome.winning (q := [0, 1, 0, 0]) (by decide) s3122_0_1_0_0
  53. private theorem s3122_0_0_0_1 : Outcome [3, 1, 2, 2] [0, 0, 0, 1] false := by
  54. apply Outcome.losing (by decide)
  55. intro q hq
  56. have eqs : options [3, 1, 2, 2] [0, 0, 0, 1] = [[0, 0, 0, 0]] := by decide
  57. rw [eqs] at hq
  58. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  59. subst q
  60. exact s3122_0_0_0_0
  61. private theorem s3122_0_0_0_2 : Outcome [3, 1, 2, 2] [0, 0, 0, 2] true := Outcome.winning (q := [0, 0, 0, 1]) (by decide) s3122_0_0_0_1
  62. private theorem s3122_0_2_0_1 : Outcome [3, 1, 2, 2] [0, 2, 0, 1] true := Outcome.winning (q := [0, 0, 0, 1]) (by decide) s3122_0_0_0_1
  63. private theorem s3122_0_2_0_0 : Outcome [3, 1, 2, 2] [0, 2, 0, 0] true := Outcome.winning (q := [0, 1, 0, 0]) (by decide) s3122_0_1_0_0
  64. private theorem s3122_0_2_0_2 : Outcome [3, 1, 2, 2] [0, 2, 0, 2] false := by
  65. apply Outcome.losing (by decide)
  66. intro q hq
  67. have eqs : options [3, 1, 2, 2] [0, 2, 0, 2] = [[0, 1, 0, 2], [0, 0, 0, 2], [0, 2, 0, 1], [0, 2, 0, 0]] := by decide
  68. rw [eqs] at hq
  69. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  70. rcases hq with rfl | rfl | rfl | rfl
  71. · exact s3122_0_1_0_2
  72. · exact s3122_0_0_0_2
  73. · exact s3122_0_2_0_1
  74. · exact s3122_0_2_0_0
  75. private theorem s3122_0_2_1_2 : Outcome [3, 1, 2, 2] [0, 2, 1, 2] true := Outcome.winning (q := [0, 2, 0, 2]) (by decide) s3122_0_2_0_2
  76. private theorem s3122_0_0_1_0 : Outcome [3, 1, 2, 2] [0, 0, 1, 0] false := by
  77. apply Outcome.losing (by decide)
  78. intro q hq
  79. have eqs : options [3, 1, 2, 2] [0, 0, 1, 0] = [[0, 0, 0, 0]] := by decide
  80. rw [eqs] at hq
  81. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  82. subst q
  83. exact s3122_0_0_0_0
  84. private theorem s3122_0_1_1_0 : Outcome [3, 1, 2, 2] [0, 1, 1, 0] true := Outcome.winning (q := [0, 0, 1, 0]) (by decide) s3122_0_0_1_0
  85. private theorem s3122_1_0_1_0 : Outcome [3, 1, 2, 2] [1, 0, 1, 0] true := Outcome.winning (q := [0, 0, 1, 0]) (by decide) s3122_0_0_1_0
  86. private theorem s3122_1_1_0_0 : Outcome [3, 1, 2, 2] [1, 1, 0, 0] true := Outcome.winning (q := [0, 1, 0, 0]) (by decide) s3122_0_1_0_0
  87. private theorem s3122_1_1_1_0 : Outcome [3, 1, 2, 2] [1, 1, 1, 0] false := by
  88. apply Outcome.losing (by decide)
  89. intro q hq
  90. have eqs : options [3, 1, 2, 2] [1, 1, 1, 0] = [[0, 1, 1, 0], [1, 0, 1, 0], [1, 1, 0, 0]] := by decide
  91. rw [eqs] at hq
  92. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  93. rcases hq with rfl | rfl | rfl
  94. · exact s3122_0_1_1_0
  95. · exact s3122_1_0_1_0
  96. · exact s3122_1_1_0_0
  97. private theorem s3122_1_1_1_2 : Outcome [3, 1, 2, 2] [1, 1, 1, 2] true := Outcome.winning (q := [1, 1, 1, 0]) (by decide) s3122_1_1_1_0
  98. private theorem s3122_0_0_1_1 : Outcome [3, 1, 2, 2] [0, 0, 1, 1] true := Outcome.winning (q := [0, 0, 0, 1]) (by decide) s3122_0_0_0_1
  99. private theorem s3122_1_0_0_1 : Outcome [3, 1, 2, 2] [1, 0, 0, 1] true := Outcome.winning (q := [0, 0, 0, 1]) (by decide) s3122_0_0_0_1
  100. private theorem s3122_1_0_1_1 : Outcome [3, 1, 2, 2] [1, 0, 1, 1] false := by
  101. apply Outcome.losing (by decide)
  102. intro q hq
  103. have eqs : options [3, 1, 2, 2] [1, 0, 1, 1] = [[0, 0, 1, 1], [1, 0, 0, 1], [1, 0, 1, 0]] := by decide
  104. rw [eqs] at hq
  105. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  106. rcases hq with rfl | rfl | rfl
  107. · exact s3122_0_0_1_1
  108. · exact s3122_1_0_0_1
  109. · exact s3122_1_0_1_0
  110. private theorem s3122_1_0_1_2 : Outcome [3, 1, 2, 2] [1, 0, 1, 2] true := Outcome.winning (q := [1, 0, 1, 1]) (by decide) s3122_1_0_1_1
  111. private theorem s3122_1_2_0_2 : Outcome [3, 1, 2, 2] [1, 2, 0, 2] true := Outcome.winning (q := [0, 2, 0, 2]) (by decide) s3122_0_2_0_2
  112. private theorem s3122_1_2_1_1 : Outcome [3, 1, 2, 2] [1, 2, 1, 1] true := Outcome.winning (q := [1, 0, 1, 1]) (by decide) s3122_1_0_1_1
  113. private theorem s3122_1_2_1_0 : Outcome [3, 1, 2, 2] [1, 2, 1, 0] true := Outcome.winning (q := [1, 1, 1, 0]) (by decide) s3122_1_1_1_0
  114. private theorem s3122_1_2_1_2 : Outcome [3, 1, 2, 2] [1, 2, 1, 2] false := by
  115. apply Outcome.losing (by decide)
  116. intro q hq
  117. have eqs : options [3, 1, 2, 2] [1, 2, 1, 2] = [[0, 2, 1, 2], [1, 1, 1, 2], [1, 0, 1, 2], [1, 2, 0, 2], [1, 2, 1, 1], [1, 2, 1, 0]] := by decide
  118. rw [eqs] at hq
  119. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  120. rcases hq with rfl | rfl | rfl | rfl | rfl | rfl
  121. · exact s3122_0_2_1_2
  122. · exact s3122_1_1_1_2
  123. · exact s3122_1_0_1_2
  124. · exact s3122_1_2_0_2
  125. · exact s3122_1_2_1_1
  126. · exact s3122_1_2_1_0
  127. private theorem s3122_1_2_4_2 : Outcome [3, 1, 2, 2] [1, 2, 4, 2] true := Outcome.winning (q := [1, 2, 1, 2]) (by decide) s3122_1_2_1_2
  128. private theorem s3122_0_0_2_0 : Outcome [3, 1, 2, 2] [0, 0, 2, 0] true := Outcome.winning (q := [0, 0, 1, 0]) (by decide) s3122_0_0_1_0
  129. private theorem s3122_0_0_3_0 : Outcome [3, 1, 2, 2] [0, 0, 3, 0] false := by
  130. apply Outcome.losing (by decide)
  131. intro q hq
  132. have eqs : options [3, 1, 2, 2] [0, 0, 3, 0] = [[0, 0, 2, 0]] := by decide
  133. rw [eqs] at hq
  134. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  135. subst q
  136. exact s3122_0_0_2_0
  137. private theorem s3122_0_0_3_1 : Outcome [3, 1, 2, 2] [0, 0, 3, 1] true := Outcome.winning (q := [0, 0, 3, 0]) (by decide) s3122_0_0_3_0
  138. private theorem s3122_0_1_0_1 : Outcome [3, 1, 2, 2] [0, 1, 0, 1] true := Outcome.winning (q := [0, 0, 0, 1]) (by decide) s3122_0_0_0_1
  139. private theorem s3122_0_1_1_1 : Outcome [3, 1, 2, 2] [0, 1, 1, 1] false := by
  140. apply Outcome.losing (by decide)
  141. intro q hq
  142. have eqs : options [3, 1, 2, 2] [0, 1, 1, 1] = [[0, 0, 1, 1], [0, 1, 0, 1], [0, 1, 1, 0]] := by decide
  143. rw [eqs] at hq
  144. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  145. rcases hq with rfl | rfl | rfl
  146. · exact s3122_0_0_1_1
  147. · exact s3122_0_1_0_1
  148. · exact s3122_0_1_1_0
  149. private theorem s3122_0_1_2_1 : Outcome [3, 1, 2, 2] [0, 1, 2, 1] true := Outcome.winning (q := [0, 1, 1, 1]) (by decide) s3122_0_1_1_1
  150. private theorem s3122_0_1_3_0 : Outcome [3, 1, 2, 2] [0, 1, 3, 0] true := Outcome.winning (q := [0, 0, 3, 0]) (by decide) s3122_0_0_3_0
  151. private theorem s3122_0_1_3_1 : Outcome [3, 1, 2, 2] [0, 1, 3, 1] false := by
  152. apply Outcome.losing (by decide)
  153. intro q hq
  154. have eqs : options [3, 1, 2, 2] [0, 1, 3, 1] = [[0, 0, 3, 1], [0, 1, 2, 1], [0, 1, 3, 0]] := by decide
  155. rw [eqs] at hq
  156. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  157. rcases hq with rfl | rfl | rfl
  158. · exact s3122_0_0_3_1
  159. · exact s3122_0_1_2_1
  160. · exact s3122_0_1_3_0
  161. private theorem s3122_0_1_3_2 : Outcome [3, 1, 2, 2] [0, 1, 3, 2] true := Outcome.winning (q := [0, 1, 3, 1]) (by decide) s3122_0_1_3_1
  162. private theorem s3122_0_0_1_2 : Outcome [3, 1, 2, 2] [0, 0, 1, 2] true := Outcome.winning (q := [0, 0, 1, 0]) (by decide) s3122_0_0_1_0
  163. private theorem s3122_0_0_2_1 : Outcome [3, 1, 2, 2] [0, 0, 2, 1] true := Outcome.winning (q := [0, 0, 0, 1]) (by decide) s3122_0_0_0_1
  164. private theorem s3122_0_0_2_2 : Outcome [3, 1, 2, 2] [0, 0, 2, 2] false := by
  165. apply Outcome.losing (by decide)
  166. intro q hq
  167. have eqs : options [3, 1, 2, 2] [0, 0, 2, 2] = [[0, 0, 1, 2], [0, 0, 0, 2], [0, 0, 2, 1], [0, 0, 2, 0]] := by decide
  168. rw [eqs] at hq
  169. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  170. rcases hq with rfl | rfl | rfl | rfl
  171. · exact s3122_0_0_1_2
  172. · exact s3122_0_0_0_2
  173. · exact s3122_0_0_2_1
  174. · exact s3122_0_0_2_0
  175. private theorem s3122_0_0_3_2 : Outcome [3, 1, 2, 2] [0, 0, 3, 2] true := Outcome.winning (q := [0, 0, 2, 2]) (by decide) s3122_0_0_2_2
  176. private theorem s3122_0_2_2_2 : Outcome [3, 1, 2, 2] [0, 2, 2, 2] true := Outcome.winning (q := [0, 0, 2, 2]) (by decide) s3122_0_0_2_2
  177. private theorem s3122_0_2_3_1 : Outcome [3, 1, 2, 2] [0, 2, 3, 1] true := Outcome.winning (q := [0, 1, 3, 1]) (by decide) s3122_0_1_3_1
  178. private theorem s3122_0_2_3_0 : Outcome [3, 1, 2, 2] [0, 2, 3, 0] true := Outcome.winning (q := [0, 0, 3, 0]) (by decide) s3122_0_0_3_0
  179. private theorem s3122_0_2_3_2 : Outcome [3, 1, 2, 2] [0, 2, 3, 2] false := by
  180. apply Outcome.losing (by decide)
  181. intro q hq
  182. have eqs : options [3, 1, 2, 2] [0, 2, 3, 2] = [[0, 1, 3, 2], [0, 0, 3, 2], [0, 2, 2, 2], [0, 2, 3, 1], [0, 2, 3, 0]] := by decide
  183. rw [eqs] at hq
  184. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  185. rcases hq with rfl | rfl | rfl | rfl | rfl
  186. · exact s3122_0_1_3_2
  187. · exact s3122_0_0_3_2
  188. · exact s3122_0_2_2_2
  189. · exact s3122_0_2_3_1
  190. · exact s3122_0_2_3_0
  191. private theorem s3122_0_2_4_2 : Outcome [3, 1, 2, 2] [0, 2, 4, 2] true := Outcome.winning (q := [0, 2, 3, 2]) (by decide) s3122_0_2_3_2
  192. private theorem s3122_0_1_1_2 : Outcome [3, 1, 2, 2] [0, 1, 1, 2] true := Outcome.winning (q := [0, 1, 1, 1]) (by decide) s3122_0_1_1_1
  193. private theorem s3122_1_0_0_0 : Outcome [3, 1, 2, 2] [1, 0, 0, 0] false := by
  194. apply Outcome.losing (by decide)
  195. intro q hq
  196. have eqs : options [3, 1, 2, 2] [1, 0, 0, 0] = [[0, 0, 0, 0]] := by decide
  197. rw [eqs] at hq
  198. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  199. subst q
  200. exact s3122_0_0_0_0
  201. private theorem s3122_1_0_0_2 : Outcome [3, 1, 2, 2] [1, 0, 0, 2] true := Outcome.winning (q := [1, 0, 0, 0]) (by decide) s3122_1_0_0_0
  202. private theorem s3122_2_0_0_1 : Outcome [3, 1, 2, 2] [2, 0, 0, 1] true := Outcome.winning (q := [0, 0, 0, 1]) (by decide) s3122_0_0_0_1
  203. private theorem s3122_2_0_0_0 : Outcome [3, 1, 2, 2] [2, 0, 0, 0] true := Outcome.winning (q := [1, 0, 0, 0]) (by decide) s3122_1_0_0_0
  204. private theorem s3122_2_0_0_2 : Outcome [3, 1, 2, 2] [2, 0, 0, 2] false := by
  205. apply Outcome.losing (by decide)
  206. intro q hq
  207. have eqs : options [3, 1, 2, 2] [2, 0, 0, 2] = [[1, 0, 0, 2], [0, 0, 0, 2], [2, 0, 0, 1], [2, 0, 0, 0]] := by decide
  208. rw [eqs] at hq
  209. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  210. rcases hq with rfl | rfl | rfl | rfl
  211. · exact s3122_1_0_0_2
  212. · exact s3122_0_0_0_2
  213. · exact s3122_2_0_0_1
  214. · exact s3122_2_0_0_0
  215. private theorem s3122_2_0_1_2 : Outcome [3, 1, 2, 2] [2, 0, 1, 2] true := Outcome.winning (q := [2, 0, 0, 2]) (by decide) s3122_2_0_0_2
  216. private theorem s3122_2_1_0_2 : Outcome [3, 1, 2, 2] [2, 1, 0, 2] true := Outcome.winning (q := [2, 0, 0, 2]) (by decide) s3122_2_0_0_2
  217. private theorem s3122_2_1_1_1 : Outcome [3, 1, 2, 2] [2, 1, 1, 1] true := Outcome.winning (q := [0, 1, 1, 1]) (by decide) s3122_0_1_1_1
  218. private theorem s3122_2_1_1_0 : Outcome [3, 1, 2, 2] [2, 1, 1, 0] true := Outcome.winning (q := [1, 1, 1, 0]) (by decide) s3122_1_1_1_0
  219. private theorem s3122_2_1_1_2 : Outcome [3, 1, 2, 2] [2, 1, 1, 2] false := by
  220. apply Outcome.losing (by decide)
  221. intro q hq
  222. have eqs : options [3, 1, 2, 2] [2, 1, 1, 2] = [[1, 1, 1, 2], [0, 1, 1, 2], [2, 0, 1, 2], [2, 1, 0, 2], [2, 1, 1, 1], [2, 1, 1, 0]] := by decide
  223. rw [eqs] at hq
  224. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  225. rcases hq with rfl | rfl | rfl | rfl | rfl | rfl
  226. · exact s3122_1_1_1_2
  227. · exact s3122_0_1_1_2
  228. · exact s3122_2_0_1_2
  229. · exact s3122_2_1_0_2
  230. · exact s3122_2_1_1_1
  231. · exact s3122_2_1_1_0
  232. private theorem s3122_2_1_4_2 : Outcome [3, 1, 2, 2] [2, 1, 4, 2] true := Outcome.winning (q := [2, 1, 1, 2]) (by decide) s3122_2_1_1_2
  233. private theorem s3122_1_0_2_1 : Outcome [3, 1, 2, 2] [1, 0, 2, 1] true := Outcome.winning (q := [1, 0, 1, 1]) (by decide) s3122_1_0_1_1
  234. private theorem s3122_1_0_3_0 : Outcome [3, 1, 2, 2] [1, 0, 3, 0] true := Outcome.winning (q := [0, 0, 3, 0]) (by decide) s3122_0_0_3_0
  235. private theorem s3122_1_0_3_1 : Outcome [3, 1, 2, 2] [1, 0, 3, 1] false := by
  236. apply Outcome.losing (by decide)
  237. intro q hq
  238. have eqs : options [3, 1, 2, 2] [1, 0, 3, 1] = [[0, 0, 3, 1], [1, 0, 2, 1], [1, 0, 3, 0]] := by decide
  239. rw [eqs] at hq
  240. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  241. rcases hq with rfl | rfl | rfl
  242. · exact s3122_0_0_3_1
  243. · exact s3122_1_0_2_1
  244. · exact s3122_1_0_3_0
  245. private theorem s3122_1_0_3_2 : Outcome [3, 1, 2, 2] [1, 0, 3, 2] true := Outcome.winning (q := [1, 0, 3, 1]) (by decide) s3122_1_0_3_1
  246. private theorem s3122_2_0_2_2 : Outcome [3, 1, 2, 2] [2, 0, 2, 2] true := Outcome.winning (q := [0, 0, 2, 2]) (by decide) s3122_0_0_2_2
  247. private theorem s3122_2_0_3_1 : Outcome [3, 1, 2, 2] [2, 0, 3, 1] true := Outcome.winning (q := [1, 0, 3, 1]) (by decide) s3122_1_0_3_1
  248. private theorem s3122_2_0_3_0 : Outcome [3, 1, 2, 2] [2, 0, 3, 0] true := Outcome.winning (q := [0, 0, 3, 0]) (by decide) s3122_0_0_3_0
  249. private theorem s3122_2_0_3_2 : Outcome [3, 1, 2, 2] [2, 0, 3, 2] false := by
  250. apply Outcome.losing (by decide)
  251. intro q hq
  252. have eqs : options [3, 1, 2, 2] [2, 0, 3, 2] = [[1, 0, 3, 2], [0, 0, 3, 2], [2, 0, 2, 2], [2, 0, 3, 1], [2, 0, 3, 0]] := by decide
  253. rw [eqs] at hq
  254. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  255. rcases hq with rfl | rfl | rfl | rfl | rfl
  256. · exact s3122_1_0_3_2
  257. · exact s3122_0_0_3_2
  258. · exact s3122_2_0_2_2
  259. · exact s3122_2_0_3_1
  260. · exact s3122_2_0_3_0
  261. private theorem s3122_2_0_4_2 : Outcome [3, 1, 2, 2] [2, 0, 4, 2] true := Outcome.winning (q := [2, 0, 3, 2]) (by decide) s3122_2_0_3_2
  262. private theorem s3122_2_2_3_2 : Outcome [3, 1, 2, 2] [2, 2, 3, 2] true := Outcome.winning (q := [0, 2, 3, 2]) (by decide) s3122_0_2_3_2
  263. private theorem s3122_2_2_1_2 : Outcome [3, 1, 2, 2] [2, 2, 1, 2] true := Outcome.winning (q := [1, 2, 1, 2]) (by decide) s3122_1_2_1_2
  264. private theorem s3122_0_2_1_1 : Outcome [3, 1, 2, 2] [0, 2, 1, 1] true := Outcome.winning (q := [0, 1, 1, 1]) (by decide) s3122_0_1_1_1
  265. private theorem s3122_2_0_1_1 : Outcome [3, 1, 2, 2] [2, 0, 1, 1] true := Outcome.winning (q := [1, 0, 1, 1]) (by decide) s3122_1_0_1_1
  266. private theorem s3122_1_2_0_0 : Outcome [3, 1, 2, 2] [1, 2, 0, 0] true := Outcome.winning (q := [1, 0, 0, 0]) (by decide) s3122_1_0_0_0
  267. private theorem s3122_2_1_0_0 : Outcome [3, 1, 2, 2] [2, 1, 0, 0] true := Outcome.winning (q := [0, 1, 0, 0]) (by decide) s3122_0_1_0_0
  268. private theorem s3122_2_2_0_0 : Outcome [3, 1, 2, 2] [2, 2, 0, 0] false := by
  269. apply Outcome.losing (by decide)
  270. intro q hq
  271. have eqs : options [3, 1, 2, 2] [2, 2, 0, 0] = [[1, 2, 0, 0], [0, 2, 0, 0], [2, 1, 0, 0], [2, 0, 0, 0]] := by decide
  272. rw [eqs] at hq
  273. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  274. rcases hq with rfl | rfl | rfl | rfl
  275. · exact s3122_1_2_0_0
  276. · exact s3122_0_2_0_0
  277. · exact s3122_2_1_0_0
  278. · exact s3122_2_0_0_0
  279. private theorem s3122_2_2_0_1 : Outcome [3, 1, 2, 2] [2, 2, 0, 1] true := Outcome.winning (q := [2, 2, 0, 0]) (by decide) s3122_2_2_0_0
  280. private theorem s3122_2_2_1_0 : Outcome [3, 1, 2, 2] [2, 2, 1, 0] true := Outcome.winning (q := [2, 2, 0, 0]) (by decide) s3122_2_2_0_0
  281. private theorem s3122_2_2_1_1 : Outcome [3, 1, 2, 2] [2, 2, 1, 1] false := by
  282. apply Outcome.losing (by decide)
  283. intro q hq
  284. have eqs : options [3, 1, 2, 2] [2, 2, 1, 1] = [[1, 2, 1, 1], [0, 2, 1, 1], [2, 1, 1, 1], [2, 0, 1, 1], [2, 2, 0, 1], [2, 2, 1, 0]] := by decide
  285. rw [eqs] at hq
  286. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  287. rcases hq with rfl | rfl | rfl | rfl | rfl | rfl
  288. · exact s3122_1_2_1_1
  289. · exact s3122_0_2_1_1
  290. · exact s3122_2_1_1_1
  291. · exact s3122_2_0_1_1
  292. · exact s3122_2_2_0_1
  293. · exact s3122_2_2_1_0
  294. private theorem s3122_2_2_4_1 : Outcome [3, 1, 2, 2] [2, 2, 4, 1] true := Outcome.winning (q := [2, 2, 1, 1]) (by decide) s3122_2_2_1_1
  295. private theorem s3122_1_1_2_0 : Outcome [3, 1, 2, 2] [1, 1, 2, 0] true := Outcome.winning (q := [1, 1, 1, 0]) (by decide) s3122_1_1_1_0
  296. private theorem s3122_1_1_3_0 : Outcome [3, 1, 2, 2] [1, 1, 3, 0] false := by
  297. apply Outcome.losing (by decide)
  298. intro q hq
  299. have eqs : options [3, 1, 2, 2] [1, 1, 3, 0] = [[0, 1, 3, 0], [1, 0, 3, 0], [1, 1, 2, 0]] := by decide
  300. rw [eqs] at hq
  301. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  302. rcases hq with rfl | rfl | rfl
  303. · exact s3122_0_1_3_0
  304. · exact s3122_1_0_3_0
  305. · exact s3122_1_1_2_0
  306. private theorem s3122_1_2_3_0 : Outcome [3, 1, 2, 2] [1, 2, 3, 0] true := Outcome.winning (q := [1, 1, 3, 0]) (by decide) s3122_1_1_3_0
  307. private theorem s3122_2_1_3_0 : Outcome [3, 1, 2, 2] [2, 1, 3, 0] true := Outcome.winning (q := [1, 1, 3, 0]) (by decide) s3122_1_1_3_0
  308. private theorem s3122_0_1_2_0 : Outcome [3, 1, 2, 2] [0, 1, 2, 0] true := Outcome.winning (q := [0, 1, 0, 0]) (by decide) s3122_0_1_0_0
  309. private theorem s3122_0_2_1_0 : Outcome [3, 1, 2, 2] [0, 2, 1, 0] true := Outcome.winning (q := [0, 0, 1, 0]) (by decide) s3122_0_0_1_0
  310. private theorem s3122_0_2_2_0 : Outcome [3, 1, 2, 2] [0, 2, 2, 0] false := by
  311. apply Outcome.losing (by decide)
  312. intro q hq
  313. have eqs : options [3, 1, 2, 2] [0, 2, 2, 0] = [[0, 1, 2, 0], [0, 0, 2, 0], [0, 2, 1, 0], [0, 2, 0, 0]] := by decide
  314. rw [eqs] at hq
  315. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  316. rcases hq with rfl | rfl | rfl | rfl
  317. · exact s3122_0_1_2_0
  318. · exact s3122_0_0_2_0
  319. · exact s3122_0_2_1_0
  320. · exact s3122_0_2_0_0
  321. private theorem s3122_2_2_2_0 : Outcome [3, 1, 2, 2] [2, 2, 2, 0] true := Outcome.winning (q := [0, 2, 2, 0]) (by decide) s3122_0_2_2_0
  322. private theorem s3122_2_2_3_0 : Outcome [3, 1, 2, 2] [2, 2, 3, 0] false := by
  323. apply Outcome.losing (by decide)
  324. intro q hq
  325. have eqs : options [3, 1, 2, 2] [2, 2, 3, 0] = [[1, 2, 3, 0], [0, 2, 3, 0], [2, 1, 3, 0], [2, 0, 3, 0], [2, 2, 2, 0]] := by decide
  326. rw [eqs] at hq
  327. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  328. rcases hq with rfl | rfl | rfl | rfl | rfl
  329. · exact s3122_1_2_3_0
  330. · exact s3122_0_2_3_0
  331. · exact s3122_2_1_3_0
  332. · exact s3122_2_0_3_0
  333. · exact s3122_2_2_2_0
  334. private theorem s3122_2_2_4_0 : Outcome [3, 1, 2, 2] [2, 2, 4, 0] true := Outcome.winning (q := [2, 2, 3, 0]) (by decide) s3122_2_2_3_0
  335. private theorem s3122_2_2_4_2 : Outcome [3, 1, 2, 2] [2, 2, 4, 2] false := by
  336. apply Outcome.losing (by decide)
  337. intro q hq
  338. have eqs : options [3, 1, 2, 2] [2, 2, 4, 2] = [[1, 2, 4, 2], [0, 2, 4, 2], [2, 1, 4, 2], [2, 0, 4, 2], [2, 2, 3, 2], [2, 2, 1, 2], [2, 2, 4, 1], [2, 2, 4, 0]] := by decide
  339. rw [eqs] at hq
  340. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  341. rcases hq with rfl | rfl | rfl | rfl | rfl | rfl | rfl | rfl
  342. · exact s3122_1_2_4_2
  343. · exact s3122_0_2_4_2
  344. · exact s3122_2_1_4_2
  345. · exact s3122_2_0_4_2
  346. · exact s3122_2_2_3_2
  347. · exact s3122_2_2_1_2
  348. · exact s3122_2_2_4_1
  349. · exact s3122_2_2_4_0
  350. private theorem s3122_2_2_7_2 : Outcome [3, 1, 2, 2] [2, 2, 7, 2] true := Outcome.winning (q := [2, 2, 4, 2]) (by decide) s3122_2_2_4_2
  351. private theorem s3122_0_0_6_2 : Outcome [3, 1, 2, 2] [0, 0, 6, 2] true := Outcome.winning (q := [0, 0, 2, 2]) (by decide) s3122_0_0_2_2
  352. private theorem s3122_0_0_4_0 : Outcome [3, 1, 2, 2] [0, 0, 4, 0] true := Outcome.winning (q := [0, 0, 3, 0]) (by decide) s3122_0_0_3_0
  353. private theorem s3122_0_0_4_1 : Outcome [3, 1, 2, 2] [0, 0, 4, 1] false := by
  354. apply Outcome.losing (by decide)
  355. intro q hq
  356. have eqs : options [3, 1, 2, 2] [0, 0, 4, 1] = [[0, 0, 3, 1], [0, 0, 1, 1], [0, 0, 4, 0]] := by decide
  357. rw [eqs] at hq
  358. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  359. rcases hq with rfl | rfl | rfl
  360. · exact s3122_0_0_3_1
  361. · exact s3122_0_0_1_1
  362. · exact s3122_0_0_4_0
  363. private theorem s3122_0_0_4_2 : Outcome [3, 1, 2, 2] [0, 0, 4, 2] true := Outcome.winning (q := [0, 0, 4, 1]) (by decide) s3122_0_0_4_1
  364. private theorem s3122_0_0_5_1 : Outcome [3, 1, 2, 2] [0, 0, 5, 1] true := Outcome.winning (q := [0, 0, 4, 1]) (by decide) s3122_0_0_4_1
  365. private theorem s3122_0_0_6_0 : Outcome [3, 1, 2, 2] [0, 0, 6, 0] true := Outcome.winning (q := [0, 0, 3, 0]) (by decide) s3122_0_0_3_0
  366. private theorem s3122_0_0_6_1 : Outcome [3, 1, 2, 2] [0, 0, 6, 1] false := by
  367. apply Outcome.losing (by decide)
  368. intro q hq
  369. have eqs : options [3, 1, 2, 2] [0, 0, 6, 1] = [[0, 0, 5, 1], [0, 0, 3, 1], [0, 0, 2, 1], [0, 0, 6, 0]] := by decide
  370. rw [eqs] at hq
  371. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  372. rcases hq with rfl | rfl | rfl | rfl
  373. · exact s3122_0_0_5_1
  374. · exact s3122_0_0_3_1
  375. · exact s3122_0_0_2_1
  376. · exact s3122_0_0_6_0
  377. private theorem s3122_0_0_7_1 : Outcome [3, 1, 2, 2] [0, 0, 7, 1] true := Outcome.winning (q := [0, 0, 6, 1]) (by decide) s3122_0_0_6_1
  378. private theorem s3122_0_0_7_0 : Outcome [3, 1, 2, 2] [0, 0, 7, 0] true := Outcome.winning (q := [0, 0, 3, 0]) (by decide) s3122_0_0_3_0
  379. private theorem s3122_0_0_7_2 : Outcome [3, 1, 2, 2] [0, 0, 7, 2] false := by
  380. apply Outcome.losing (by decide)
  381. intro q hq
  382. have eqs : options [3, 1, 2, 2] [0, 0, 7, 2] = [[0, 0, 6, 2], [0, 0, 4, 2], [0, 0, 3, 2], [0, 0, 7, 1], [0, 0, 7, 0]] := by decide
  383. rw [eqs] at hq
  384. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  385. rcases hq with rfl | rfl | rfl | rfl | rfl
  386. · exact s3122_0_0_6_2
  387. · exact s3122_0_0_4_2
  388. · exact s3122_0_0_3_2
  389. · exact s3122_0_0_7_1
  390. · exact s3122_0_0_7_0
  391. private theorem s3122_0_0_8_2 : Outcome [3, 1, 2, 2] [0, 0, 8, 2] true := Outcome.winning (q := [0, 0, 7, 2]) (by decide) s3122_0_0_7_2
  392. private theorem s3122_0_0_5_2 : Outcome [3, 1, 2, 2] [0, 0, 5, 2] true := Outcome.winning (q := [0, 0, 2, 2]) (by decide) s3122_0_0_2_2
  393. private theorem s3122_0_0_9_1 : Outcome [3, 1, 2, 2] [0, 0, 9, 1] true := Outcome.winning (q := [0, 0, 6, 1]) (by decide) s3122_0_0_6_1
  394. private theorem s3122_0_0_5_0 : Outcome [3, 1, 2, 2] [0, 0, 5, 0] true := Outcome.winning (q := [0, 0, 1, 0]) (by decide) s3122_0_0_1_0
  395. private theorem s3122_0_0_8_0 : Outcome [3, 1, 2, 2] [0, 0, 8, 0] false := by
  396. apply Outcome.losing (by decide)
  397. intro q hq
  398. have eqs : options [3, 1, 2, 2] [0, 0, 8, 0] = [[0, 0, 7, 0], [0, 0, 5, 0], [0, 0, 4, 0]] := by decide
  399. rw [eqs] at hq
  400. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  401. rcases hq with rfl | rfl | rfl
  402. · exact s3122_0_0_7_0
  403. · exact s3122_0_0_5_0
  404. · exact s3122_0_0_4_0
  405. private theorem s3122_0_0_9_0 : Outcome [3, 1, 2, 2] [0, 0, 9, 0] true := Outcome.winning (q := [0, 0, 8, 0]) (by decide) s3122_0_0_8_0
  406. private theorem s3122_0_0_9_2 : Outcome [3, 1, 2, 2] [0, 0, 9, 2] false := by
  407. apply Outcome.losing (by decide)
  408. intro q hq
  409. have eqs : options [3, 1, 2, 2] [0, 0, 9, 2] = [[0, 0, 8, 2], [0, 0, 6, 2], [0, 0, 5, 2], [0, 0, 9, 1], [0, 0, 9, 0]] := by decide
  410. rw [eqs] at hq
  411. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  412. rcases hq with rfl | rfl | rfl | rfl | rfl
  413. · exact s3122_0_0_8_2
  414. · exact s3122_0_0_6_2
  415. · exact s3122_0_0_5_2
  416. · exact s3122_0_0_9_1
  417. · exact s3122_0_0_9_0
  418. private theorem s3122_0_0_13_2 : Outcome [3, 1, 2, 2] [0, 0, 13, 2] true := Outcome.winning (q := [0, 0, 9, 2]) (by decide) s3122_0_0_9_2
  419. private theorem s3122_0_0_11_2 : Outcome [3, 1, 2, 2] [0, 0, 11, 2] true := Outcome.winning (q := [0, 0, 7, 2]) (by decide) s3122_0_0_7_2
  420. private theorem s3122_0_0_10_2 : Outcome [3, 1, 2, 2] [0, 0, 10, 2] true := Outcome.winning (q := [0, 0, 9, 2]) (by decide) s3122_0_0_9_2
  421. private theorem s3122_0_0_10_1 : Outcome [3, 1, 2, 2] [0, 0, 10, 1] true := Outcome.winning (q := [0, 0, 6, 1]) (by decide) s3122_0_0_6_1
  422. private theorem s3122_0_0_8_1 : Outcome [3, 1, 2, 2] [0, 0, 8, 1] true := Outcome.winning (q := [0, 0, 4, 1]) (by decide) s3122_0_0_4_1
  423. private theorem s3122_0_0_10_0 : Outcome [3, 1, 2, 2] [0, 0, 10, 0] false := by
  424. apply Outcome.losing (by decide)
  425. intro q hq
  426. have eqs : options [3, 1, 2, 2] [0, 0, 10, 0] = [[0, 0, 9, 0], [0, 0, 7, 0], [0, 0, 6, 0]] := by decide
  427. rw [eqs] at hq
  428. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  429. rcases hq with rfl | rfl | rfl
  430. · exact s3122_0_0_9_0
  431. · exact s3122_0_0_7_0
  432. · exact s3122_0_0_6_0
  433. private theorem s3122_0_0_11_0 : Outcome [3, 1, 2, 2] [0, 0, 11, 0] true := Outcome.winning (q := [0, 0, 10, 0]) (by decide) s3122_0_0_10_0
  434. private theorem s3122_0_0_11_1 : Outcome [3, 1, 2, 2] [0, 0, 11, 1] false := by
  435. apply Outcome.losing (by decide)
  436. intro q hq
  437. have eqs : options [3, 1, 2, 2] [0, 0, 11, 1] = [[0, 0, 10, 1], [0, 0, 8, 1], [0, 0, 7, 1], [0, 0, 11, 0]] := by decide
  438. rw [eqs] at hq
  439. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  440. rcases hq with rfl | rfl | rfl | rfl
  441. · exact s3122_0_0_10_1
  442. · exact s3122_0_0_8_1
  443. · exact s3122_0_0_7_1
  444. · exact s3122_0_0_11_0
  445. private theorem s3122_0_0_12_1 : Outcome [3, 1, 2, 2] [0, 0, 12, 1] true := Outcome.winning (q := [0, 0, 11, 1]) (by decide) s3122_0_0_11_1
  446. private theorem s3122_0_0_13_0 : Outcome [3, 1, 2, 2] [0, 0, 13, 0] true := Outcome.winning (q := [0, 0, 10, 0]) (by decide) s3122_0_0_10_0
  447. private theorem s3122_0_0_13_1 : Outcome [3, 1, 2, 2] [0, 0, 13, 1] false := by
  448. apply Outcome.losing (by decide)
  449. intro q hq
  450. have eqs : options [3, 1, 2, 2] [0, 0, 13, 1] = [[0, 0, 12, 1], [0, 0, 10, 1], [0, 0, 9, 1], [0, 0, 13, 0]] := by decide
  451. rw [eqs] at hq
  452. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  453. rcases hq with rfl | rfl | rfl | rfl
  454. · exact s3122_0_0_12_1
  455. · exact s3122_0_0_10_1
  456. · exact s3122_0_0_9_1
  457. · exact s3122_0_0_13_0
  458. private theorem s3122_0_0_14_1 : Outcome [3, 1, 2, 2] [0, 0, 14, 1] true := Outcome.winning (q := [0, 0, 13, 1]) (by decide) s3122_0_0_13_1
  459. private theorem s3122_0_0_14_0 : Outcome [3, 1, 2, 2] [0, 0, 14, 0] true := Outcome.winning (q := [0, 0, 10, 0]) (by decide) s3122_0_0_10_0
  460. private theorem s3122_0_0_14_2 : Outcome [3, 1, 2, 2] [0, 0, 14, 2] false := by
  461. apply Outcome.losing (by decide)
  462. intro q hq
  463. have eqs : options [3, 1, 2, 2] [0, 0, 14, 2] = [[0, 0, 13, 2], [0, 0, 11, 2], [0, 0, 10, 2], [0, 0, 14, 1], [0, 0, 14, 0]] := by decide
  464. rw [eqs] at hq
  465. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  466. rcases hq with rfl | rfl | rfl | rfl | rfl
  467. · exact s3122_0_0_13_2
  468. · exact s3122_0_0_11_2
  469. · exact s3122_0_0_10_2
  470. · exact s3122_0_0_14_1
  471. · exact s3122_0_0_14_0
  472. private theorem s3122_0_1_14_2 : Outcome [3, 1, 2, 2] [0, 1, 14, 2] true := Outcome.winning (q := [0, 0, 14, 2]) (by decide) s3122_0_0_14_2
  473. private theorem s3122_1_0_14_2 : Outcome [3, 1, 2, 2] [1, 0, 14, 2] true := Outcome.winning (q := [0, 0, 14, 2]) (by decide) s3122_0_0_14_2
  474. private theorem s3122_0_1_9_2 : Outcome [3, 1, 2, 2] [0, 1, 9, 2] true := Outcome.winning (q := [0, 0, 9, 2]) (by decide) s3122_0_0_9_2
  475. private theorem s3122_1_0_9_2 : Outcome [3, 1, 2, 2] [1, 0, 9, 2] true := Outcome.winning (q := [0, 0, 9, 2]) (by decide) s3122_0_0_9_2
  476. private theorem s3122_0_1_7_2 : Outcome [3, 1, 2, 2] [0, 1, 7, 2] true := Outcome.winning (q := [0, 0, 7, 2]) (by decide) s3122_0_0_7_2
  477. private theorem s3122_1_0_7_2 : Outcome [3, 1, 2, 2] [1, 0, 7, 2] true := Outcome.winning (q := [0, 0, 7, 2]) (by decide) s3122_0_0_7_2
  478. private theorem s3122_0_1_2_2 : Outcome [3, 1, 2, 2] [0, 1, 2, 2] true := Outcome.winning (q := [0, 0, 2, 2]) (by decide) s3122_0_0_2_2
  479. private theorem s3122_1_0_2_2 : Outcome [3, 1, 2, 2] [1, 0, 2, 2] true := Outcome.winning (q := [0, 0, 2, 2]) (by decide) s3122_0_0_2_2
  480. private theorem s3122_1_1_0_1 : Outcome [3, 1, 2, 2] [1, 1, 0, 1] false := by
  481. apply Outcome.losing (by decide)
  482. intro q hq
  483. have eqs : options [3, 1, 2, 2] [1, 1, 0, 1] = [[0, 1, 0, 1], [1, 0, 0, 1], [1, 1, 0, 0]] := by decide
  484. rw [eqs] at hq
  485. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  486. rcases hq with rfl | rfl | rfl
  487. · exact s3122_0_1_0_1
  488. · exact s3122_1_0_0_1
  489. · exact s3122_1_1_0_0
  490. private theorem s3122_1_1_0_2 : Outcome [3, 1, 2, 2] [1, 1, 0, 2] true := Outcome.winning (q := [1, 1, 0, 1]) (by decide) s3122_1_1_0_1
  491. private theorem s3122_1_1_2_1 : Outcome [3, 1, 2, 2] [1, 1, 2, 1] true := Outcome.winning (q := [1, 1, 0, 1]) (by decide) s3122_1_1_0_1
  492. private theorem s3122_1_1_2_2 : Outcome [3, 1, 2, 2] [1, 1, 2, 2] false := by
  493. apply Outcome.losing (by decide)
  494. intro q hq
  495. have eqs : options [3, 1, 2, 2] [1, 1, 2, 2] = [[0, 1, 2, 2], [1, 0, 2, 2], [1, 1, 1, 2], [1, 1, 0, 2], [1, 1, 2, 1], [1, 1, 2, 0]] := by decide
  496. rw [eqs] at hq
  497. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  498. rcases hq with rfl | rfl | rfl | rfl | rfl | rfl
  499. · exact s3122_0_1_2_2
  500. · exact s3122_1_0_2_2
  501. · exact s3122_1_1_1_2
  502. · exact s3122_1_1_0_2
  503. · exact s3122_1_1_2_1
  504. · exact s3122_1_1_2_0
  505. private theorem s3122_1_1_6_2 : Outcome [3, 1, 2, 2] [1, 1, 6, 2] true := Outcome.winning (q := [1, 1, 2, 2]) (by decide) s3122_1_1_2_2
  506. private theorem s3122_0_1_4_1 : Outcome [3, 1, 2, 2] [0, 1, 4, 1] true := Outcome.winning (q := [0, 0, 4, 1]) (by decide) s3122_0_0_4_1
  507. private theorem s3122_1_0_4_1 : Outcome [3, 1, 2, 2] [1, 0, 4, 1] true := Outcome.winning (q := [0, 0, 4, 1]) (by decide) s3122_0_0_4_1
  508. private theorem s3122_1_1_3_1 : Outcome [3, 1, 2, 2] [1, 1, 3, 1] true := Outcome.winning (q := [0, 1, 3, 1]) (by decide) s3122_0_1_3_1
  509. private theorem s3122_1_1_1_1 : Outcome [3, 1, 2, 2] [1, 1, 1, 1] true := Outcome.winning (q := [0, 1, 1, 1]) (by decide) s3122_0_1_1_1
  510. private theorem s3122_0_1_4_0 : Outcome [3, 1, 2, 2] [0, 1, 4, 0] false := by
  511. apply Outcome.losing (by decide)
  512. intro q hq
  513. have eqs : options [3, 1, 2, 2] [0, 1, 4, 0] = [[0, 0, 4, 0], [0, 1, 3, 0], [0, 1, 1, 0]] := by decide
  514. rw [eqs] at hq
  515. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  516. rcases hq with rfl | rfl | rfl
  517. · exact s3122_0_0_4_0
  518. · exact s3122_0_1_3_0
  519. · exact s3122_0_1_1_0
  520. private theorem s3122_1_1_4_0 : Outcome [3, 1, 2, 2] [1, 1, 4, 0] true := Outcome.winning (q := [0, 1, 4, 0]) (by decide) s3122_0_1_4_0
  521. private theorem s3122_1_1_4_1 : Outcome [3, 1, 2, 2] [1, 1, 4, 1] false := by
  522. apply Outcome.losing (by decide)
  523. intro q hq
  524. have eqs : options [3, 1, 2, 2] [1, 1, 4, 1] = [[0, 1, 4, 1], [1, 0, 4, 1], [1, 1, 3, 1], [1, 1, 1, 1], [1, 1, 4, 0]] := by decide
  525. rw [eqs] at hq
  526. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  527. rcases hq with rfl | rfl | rfl | rfl | rfl
  528. · exact s3122_0_1_4_1
  529. · exact s3122_1_0_4_1
  530. · exact s3122_1_1_3_1
  531. · exact s3122_1_1_1_1
  532. · exact s3122_1_1_4_0
  533. private theorem s3122_1_1_4_2 : Outcome [3, 1, 2, 2] [1, 1, 4, 2] true := Outcome.winning (q := [1, 1, 4, 1]) (by decide) s3122_1_1_4_1
  534. private theorem s3122_1_1_3_2 : Outcome [3, 1, 2, 2] [1, 1, 3, 2] true := Outcome.winning (q := [1, 1, 2, 2]) (by decide) s3122_1_1_2_2
  535. private theorem s3122_0_1_6_1 : Outcome [3, 1, 2, 2] [0, 1, 6, 1] true := Outcome.winning (q := [0, 0, 6, 1]) (by decide) s3122_0_0_6_1
  536. private theorem s3122_1_0_6_1 : Outcome [3, 1, 2, 2] [1, 0, 6, 1] true := Outcome.winning (q := [0, 0, 6, 1]) (by decide) s3122_0_0_6_1
  537. private theorem s3122_1_1_5_1 : Outcome [3, 1, 2, 2] [1, 1, 5, 1] true := Outcome.winning (q := [1, 1, 4, 1]) (by decide) s3122_1_1_4_1
  538. private theorem s3122_0_1_5_0 : Outcome [3, 1, 2, 2] [0, 1, 5, 0] true := Outcome.winning (q := [0, 1, 4, 0]) (by decide) s3122_0_1_4_0
  539. private theorem s3122_0_1_6_0 : Outcome [3, 1, 2, 2] [0, 1, 6, 0] false := by
  540. apply Outcome.losing (by decide)
  541. intro q hq
  542. have eqs : options [3, 1, 2, 2] [0, 1, 6, 0] = [[0, 0, 6, 0], [0, 1, 5, 0], [0, 1, 3, 0], [0, 1, 2, 0]] := by decide
  543. rw [eqs] at hq
  544. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  545. rcases hq with rfl | rfl | rfl | rfl
  546. · exact s3122_0_0_6_0
  547. · exact s3122_0_1_5_0
  548. · exact s3122_0_1_3_0
  549. · exact s3122_0_1_2_0
  550. private theorem s3122_1_1_6_0 : Outcome [3, 1, 2, 2] [1, 1, 6, 0] true := Outcome.winning (q := [0, 1, 6, 0]) (by decide) s3122_0_1_6_0
  551. private theorem s3122_1_1_6_1 : Outcome [3, 1, 2, 2] [1, 1, 6, 1] false := by
  552. apply Outcome.losing (by decide)
  553. intro q hq
  554. have eqs : options [3, 1, 2, 2] [1, 1, 6, 1] = [[0, 1, 6, 1], [1, 0, 6, 1], [1, 1, 5, 1], [1, 1, 3, 1], [1, 1, 2, 1], [1, 1, 6, 0]] := by decide
  555. rw [eqs] at hq
  556. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  557. rcases hq with rfl | rfl | rfl | rfl | rfl | rfl
  558. · exact s3122_0_1_6_1
  559. · exact s3122_1_0_6_1
  560. · exact s3122_1_1_5_1
  561. · exact s3122_1_1_3_1
  562. · exact s3122_1_1_2_1
  563. · exact s3122_1_1_6_0
  564. private theorem s3122_1_1_7_1 : Outcome [3, 1, 2, 2] [1, 1, 7, 1] true := Outcome.winning (q := [1, 1, 6, 1]) (by decide) s3122_1_1_6_1
  565. private theorem s3122_1_1_7_0 : Outcome [3, 1, 2, 2] [1, 1, 7, 0] true := Outcome.winning (q := [1, 1, 3, 0]) (by decide) s3122_1_1_3_0
  566. private theorem s3122_1_1_7_2 : Outcome [3, 1, 2, 2] [1, 1, 7, 2] false := by
  567. apply Outcome.losing (by decide)
  568. intro q hq
  569. have eqs : options [3, 1, 2, 2] [1, 1, 7, 2] = [[0, 1, 7, 2], [1, 0, 7, 2], [1, 1, 6, 2], [1, 1, 4, 2], [1, 1, 3, 2], [1, 1, 7, 1], [1, 1, 7, 0]] := by decide
  570. rw [eqs] at hq
  571. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  572. rcases hq with rfl | rfl | rfl | rfl | rfl | rfl | rfl
  573. · exact s3122_0_1_7_2
  574. · exact s3122_1_0_7_2
  575. · exact s3122_1_1_6_2
  576. · exact s3122_1_1_4_2
  577. · exact s3122_1_1_3_2
  578. · exact s3122_1_1_7_1
  579. · exact s3122_1_1_7_0
  580. private theorem s3122_1_1_8_2 : Outcome [3, 1, 2, 2] [1, 1, 8, 2] true := Outcome.winning (q := [1, 1, 7, 2]) (by decide) s3122_1_1_7_2
  581. private theorem s3122_0_1_4_2 : Outcome [3, 1, 2, 2] [0, 1, 4, 2] true := Outcome.winning (q := [0, 1, 4, 0]) (by decide) s3122_0_1_4_0
  582. private theorem s3122_0_1_5_1 : Outcome [3, 1, 2, 2] [0, 1, 5, 1] true := Outcome.winning (q := [0, 1, 1, 1]) (by decide) s3122_0_1_1_1
  583. private theorem s3122_0_1_5_2 : Outcome [3, 1, 2, 2] [0, 1, 5, 2] false := by
  584. apply Outcome.losing (by decide)
  585. intro q hq
  586. have eqs : options [3, 1, 2, 2] [0, 1, 5, 2] = [[0, 0, 5, 2], [0, 1, 4, 2], [0, 1, 2, 2], [0, 1, 1, 2], [0, 1, 5, 1], [0, 1, 5, 0]] := by decide
  587. rw [eqs] at hq
  588. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  589. rcases hq with rfl | rfl | rfl | rfl | rfl | rfl
  590. · exact s3122_0_0_5_2
  591. · exact s3122_0_1_4_2
  592. · exact s3122_0_1_2_2
  593. · exact s3122_0_1_1_2
  594. · exact s3122_0_1_5_1
  595. · exact s3122_0_1_5_0
  596. private theorem s3122_1_1_5_2 : Outcome [3, 1, 2, 2] [1, 1, 5, 2] true := Outcome.winning (q := [0, 1, 5, 2]) (by decide) s3122_0_1_5_2
  597. private theorem s3122_1_1_9_1 : Outcome [3, 1, 2, 2] [1, 1, 9, 1] true := Outcome.winning (q := [1, 1, 6, 1]) (by decide) s3122_1_1_6_1
  598. private theorem s3122_0_1_8_0 : Outcome [3, 1, 2, 2] [0, 1, 8, 0] true := Outcome.winning (q := [0, 0, 8, 0]) (by decide) s3122_0_0_8_0
  599. private theorem s3122_1_0_8_0 : Outcome [3, 1, 2, 2] [1, 0, 8, 0] true := Outcome.winning (q := [0, 0, 8, 0]) (by decide) s3122_0_0_8_0
  600. private theorem s3122_1_1_5_0 : Outcome [3, 1, 2, 2] [1, 1, 5, 0] true := Outcome.winning (q := [1, 1, 1, 0]) (by decide) s3122_1_1_1_0
  601. private theorem s3122_1_1_8_0 : Outcome [3, 1, 2, 2] [1, 1, 8, 0] false := by
  602. apply Outcome.losing (by decide)
  603. intro q hq
  604. have eqs : options [3, 1, 2, 2] [1, 1, 8, 0] = [[0, 1, 8, 0], [1, 0, 8, 0], [1, 1, 7, 0], [1, 1, 5, 0], [1, 1, 4, 0]] := by decide
  605. rw [eqs] at hq
  606. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  607. rcases hq with rfl | rfl | rfl | rfl | rfl
  608. · exact s3122_0_1_8_0
  609. · exact s3122_1_0_8_0
  610. · exact s3122_1_1_7_0
  611. · exact s3122_1_1_5_0
  612. · exact s3122_1_1_4_0
  613. private theorem s3122_1_1_9_0 : Outcome [3, 1, 2, 2] [1, 1, 9, 0] true := Outcome.winning (q := [1, 1, 8, 0]) (by decide) s3122_1_1_8_0
  614. private theorem s3122_1_1_9_2 : Outcome [3, 1, 2, 2] [1, 1, 9, 2] false := by
  615. apply Outcome.losing (by decide)
  616. intro q hq
  617. have eqs : options [3, 1, 2, 2] [1, 1, 9, 2] = [[0, 1, 9, 2], [1, 0, 9, 2], [1, 1, 8, 2], [1, 1, 6, 2], [1, 1, 5, 2], [1, 1, 9, 1], [1, 1, 9, 0]] := by decide
  618. rw [eqs] at hq
  619. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  620. rcases hq with rfl | rfl | rfl | rfl | rfl | rfl | rfl
  621. · exact s3122_0_1_9_2
  622. · exact s3122_1_0_9_2
  623. · exact s3122_1_1_8_2
  624. · exact s3122_1_1_6_2
  625. · exact s3122_1_1_5_2
  626. · exact s3122_1_1_9_1
  627. · exact s3122_1_1_9_0
  628. private theorem s3122_1_1_13_2 : Outcome [3, 1, 2, 2] [1, 1, 13, 2] true := Outcome.winning (q := [1, 1, 9, 2]) (by decide) s3122_1_1_9_2
  629. private theorem s3122_1_1_11_2 : Outcome [3, 1, 2, 2] [1, 1, 11, 2] true := Outcome.winning (q := [1, 1, 7, 2]) (by decide) s3122_1_1_7_2
  630. private theorem s3122_1_1_10_2 : Outcome [3, 1, 2, 2] [1, 1, 10, 2] true := Outcome.winning (q := [1, 1, 9, 2]) (by decide) s3122_1_1_9_2
  631. private theorem s3122_0_1_13_1 : Outcome [3, 1, 2, 2] [0, 1, 13, 1] true := Outcome.winning (q := [0, 0, 13, 1]) (by decide) s3122_0_0_13_1
  632. private theorem s3122_1_0_13_1 : Outcome [3, 1, 2, 2] [1, 0, 13, 1] true := Outcome.winning (q := [0, 0, 13, 1]) (by decide) s3122_0_0_13_1
  633. private theorem s3122_0_1_11_1 : Outcome [3, 1, 2, 2] [0, 1, 11, 1] true := Outcome.winning (q := [0, 0, 11, 1]) (by decide) s3122_0_0_11_1
  634. private theorem s3122_1_0_11_1 : Outcome [3, 1, 2, 2] [1, 0, 11, 1] true := Outcome.winning (q := [0, 0, 11, 1]) (by decide) s3122_0_0_11_1
  635. private theorem s3122_0_1_7_1 : Outcome [3, 1, 2, 2] [0, 1, 7, 1] true := Outcome.winning (q := [0, 1, 3, 1]) (by decide) s3122_0_1_3_1
  636. private theorem s3122_0_1_8_1 : Outcome [3, 1, 2, 2] [0, 1, 8, 1] false := by
  637. apply Outcome.losing (by decide)
  638. intro q hq
  639. have eqs : options [3, 1, 2, 2] [0, 1, 8, 1] = [[0, 0, 8, 1], [0, 1, 7, 1], [0, 1, 5, 1], [0, 1, 4, 1], [0, 1, 8, 0]] := by decide
  640. rw [eqs] at hq
  641. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  642. rcases hq with rfl | rfl | rfl | rfl | rfl
  643. · exact s3122_0_0_8_1
  644. · exact s3122_0_1_7_1
  645. · exact s3122_0_1_5_1
  646. · exact s3122_0_1_4_1
  647. · exact s3122_0_1_8_0
  648. private theorem s3122_0_1_9_1 : Outcome [3, 1, 2, 2] [0, 1, 9, 1] true := Outcome.winning (q := [0, 1, 8, 1]) (by decide) s3122_0_1_8_1
  649. private theorem s3122_0_1_10_0 : Outcome [3, 1, 2, 2] [0, 1, 10, 0] true := Outcome.winning (q := [0, 0, 10, 0]) (by decide) s3122_0_0_10_0
  650. private theorem s3122_0_1_10_1 : Outcome [3, 1, 2, 2] [0, 1, 10, 1] false := by
  651. apply Outcome.losing (by decide)
  652. intro q hq
  653. have eqs : options [3, 1, 2, 2] [0, 1, 10, 1] = [[0, 0, 10, 1], [0, 1, 9, 1], [0, 1, 7, 1], [0, 1, 6, 1], [0, 1, 10, 0]] := by decide
  654. rw [eqs] at hq
  655. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  656. rcases hq with rfl | rfl | rfl | rfl | rfl
  657. · exact s3122_0_0_10_1
  658. · exact s3122_0_1_9_1
  659. · exact s3122_0_1_7_1
  660. · exact s3122_0_1_6_1
  661. · exact s3122_0_1_10_0
  662. private theorem s3122_1_1_10_1 : Outcome [3, 1, 2, 2] [1, 1, 10, 1] true := Outcome.winning (q := [0, 1, 10, 1]) (by decide) s3122_0_1_10_1
  663. private theorem s3122_1_1_8_1 : Outcome [3, 1, 2, 2] [1, 1, 8, 1] true := Outcome.winning (q := [0, 1, 8, 1]) (by decide) s3122_0_1_8_1
  664. private theorem s3122_0_1_7_0 : Outcome [3, 1, 2, 2] [0, 1, 7, 0] true := Outcome.winning (q := [0, 1, 6, 0]) (by decide) s3122_0_1_6_0
  665. private theorem s3122_0_1_11_0 : Outcome [3, 1, 2, 2] [0, 1, 11, 0] false := by
  666. apply Outcome.losing (by decide)
  667. intro q hq
  668. have eqs : options [3, 1, 2, 2] [0, 1, 11, 0] = [[0, 0, 11, 0], [0, 1, 10, 0], [0, 1, 8, 0], [0, 1, 7, 0]] := by decide
  669. rw [eqs] at hq
  670. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  671. rcases hq with rfl | rfl | rfl | rfl
  672. · exact s3122_0_0_11_0
  673. · exact s3122_0_1_10_0
  674. · exact s3122_0_1_8_0
  675. · exact s3122_0_1_7_0
  676. private theorem s3122_1_1_11_0 : Outcome [3, 1, 2, 2] [1, 1, 11, 0] true := Outcome.winning (q := [0, 1, 11, 0]) (by decide) s3122_0_1_11_0
  677. private theorem s3122_1_1_11_1 : Outcome [3, 1, 2, 2] [1, 1, 11, 1] false := by
  678. apply Outcome.losing (by decide)
  679. intro q hq
  680. have eqs : options [3, 1, 2, 2] [1, 1, 11, 1] = [[0, 1, 11, 1], [1, 0, 11, 1], [1, 1, 10, 1], [1, 1, 8, 1], [1, 1, 7, 1], [1, 1, 11, 0]] := by decide
  681. rw [eqs] at hq
  682. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  683. rcases hq with rfl | rfl | rfl | rfl | rfl | rfl
  684. · exact s3122_0_1_11_1
  685. · exact s3122_1_0_11_1
  686. · exact s3122_1_1_10_1
  687. · exact s3122_1_1_8_1
  688. · exact s3122_1_1_7_1
  689. · exact s3122_1_1_11_0
  690. private theorem s3122_1_1_12_1 : Outcome [3, 1, 2, 2] [1, 1, 12, 1] true := Outcome.winning (q := [1, 1, 11, 1]) (by decide) s3122_1_1_11_1
  691. private theorem s3122_0_1_12_0 : Outcome [3, 1, 2, 2] [0, 1, 12, 0] true := Outcome.winning (q := [0, 1, 11, 0]) (by decide) s3122_0_1_11_0
  692. private theorem s3122_0_1_9_0 : Outcome [3, 1, 2, 2] [0, 1, 9, 0] true := Outcome.winning (q := [0, 1, 6, 0]) (by decide) s3122_0_1_6_0
  693. private theorem s3122_0_1_13_0 : Outcome [3, 1, 2, 2] [0, 1, 13, 0] false := by
  694. apply Outcome.losing (by decide)
  695. intro q hq
  696. have eqs : options [3, 1, 2, 2] [0, 1, 13, 0] = [[0, 0, 13, 0], [0, 1, 12, 0], [0, 1, 10, 0], [0, 1, 9, 0]] := by decide
  697. rw [eqs] at hq
  698. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  699. rcases hq with rfl | rfl | rfl | rfl
  700. · exact s3122_0_0_13_0
  701. · exact s3122_0_1_12_0
  702. · exact s3122_0_1_10_0
  703. · exact s3122_0_1_9_0
  704. private theorem s3122_1_1_13_0 : Outcome [3, 1, 2, 2] [1, 1, 13, 0] true := Outcome.winning (q := [0, 1, 13, 0]) (by decide) s3122_0_1_13_0
  705. private theorem s3122_1_1_13_1 : Outcome [3, 1, 2, 2] [1, 1, 13, 1] false := by
  706. apply Outcome.losing (by decide)
  707. intro q hq
  708. have eqs : options [3, 1, 2, 2] [1, 1, 13, 1] = [[0, 1, 13, 1], [1, 0, 13, 1], [1, 1, 12, 1], [1, 1, 10, 1], [1, 1, 9, 1], [1, 1, 13, 0]] := by decide
  709. rw [eqs] at hq
  710. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  711. rcases hq with rfl | rfl | rfl | rfl | rfl | rfl
  712. · exact s3122_0_1_13_1
  713. · exact s3122_1_0_13_1
  714. · exact s3122_1_1_12_1
  715. · exact s3122_1_1_10_1
  716. · exact s3122_1_1_9_1
  717. · exact s3122_1_1_13_0
  718. private theorem s3122_1_1_14_1 : Outcome [3, 1, 2, 2] [1, 1, 14, 1] true := Outcome.winning (q := [1, 1, 13, 1]) (by decide) s3122_1_1_13_1
  719. private theorem s3122_1_0_10_0 : Outcome [3, 1, 2, 2] [1, 0, 10, 0] true := Outcome.winning (q := [0, 0, 10, 0]) (by decide) s3122_0_0_10_0
  720. private theorem s3122_1_1_10_0 : Outcome [3, 1, 2, 2] [1, 1, 10, 0] false := by
  721. apply Outcome.losing (by decide)
  722. intro q hq
  723. have eqs : options [3, 1, 2, 2] [1, 1, 10, 0] = [[0, 1, 10, 0], [1, 0, 10, 0], [1, 1, 9, 0], [1, 1, 7, 0], [1, 1, 6, 0]] := by decide
  724. rw [eqs] at hq
  725. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  726. rcases hq with rfl | rfl | rfl | rfl | rfl
  727. · exact s3122_0_1_10_0
  728. · exact s3122_1_0_10_0
  729. · exact s3122_1_1_9_0
  730. · exact s3122_1_1_7_0
  731. · exact s3122_1_1_6_0
  732. private theorem s3122_1_1_14_0 : Outcome [3, 1, 2, 2] [1, 1, 14, 0] true := Outcome.winning (q := [1, 1, 10, 0]) (by decide) s3122_1_1_10_0
  733. private theorem s3122_1_1_14_2 : Outcome [3, 1, 2, 2] [1, 1, 14, 2] false := by
  734. apply Outcome.losing (by decide)
  735. intro q hq
  736. have eqs : options [3, 1, 2, 2] [1, 1, 14, 2] = [[0, 1, 14, 2], [1, 0, 14, 2], [1, 1, 13, 2], [1, 1, 11, 2], [1, 1, 10, 2], [1, 1, 14, 1], [1, 1, 14, 0]] := by decide
  737. rw [eqs] at hq
  738. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  739. rcases hq with rfl | rfl | rfl | rfl | rfl | rfl | rfl
  740. · exact s3122_0_1_14_2
  741. · exact s3122_1_0_14_2
  742. · exact s3122_1_1_13_2
  743. · exact s3122_1_1_11_2
  744. · exact s3122_1_1_10_2
  745. · exact s3122_1_1_14_1
  746. · exact s3122_1_1_14_0
  747. private theorem s3122_1_2_14_2 : Outcome [3, 1, 2, 2] [1, 2, 14, 2] true := Outcome.winning (q := [1, 1, 14, 2]) (by decide) s3122_1_1_14_2
  748. private theorem s3122_0_2_14_2 : Outcome [3, 1, 2, 2] [0, 2, 14, 2] true := Outcome.winning (q := [0, 0, 14, 2]) (by decide) s3122_0_0_14_2
  749. private theorem s3122_2_1_14_2 : Outcome [3, 1, 2, 2] [2, 1, 14, 2] true := Outcome.winning (q := [1, 1, 14, 2]) (by decide) s3122_1_1_14_2
  750. private theorem s3122_2_0_14_2 : Outcome [3, 1, 2, 2] [2, 0, 14, 2] true := Outcome.winning (q := [0, 0, 14, 2]) (by decide) s3122_0_0_14_2
  751. private theorem s3122_0_1_10_2 : Outcome [3, 1, 2, 2] [0, 1, 10, 2] true := Outcome.winning (q := [0, 1, 10, 1]) (by decide) s3122_0_1_10_1
  752. private theorem s3122_0_2_9_2 : Outcome [3, 1, 2, 2] [0, 2, 9, 2] true := Outcome.winning (q := [0, 0, 9, 2]) (by decide) s3122_0_0_9_2
  753. private theorem s3122_0_2_7_2 : Outcome [3, 1, 2, 2] [0, 2, 7, 2] true := Outcome.winning (q := [0, 0, 7, 2]) (by decide) s3122_0_0_7_2
  754. private theorem s3122_0_2_6_2 : Outcome [3, 1, 2, 2] [0, 2, 6, 2] true := Outcome.winning (q := [0, 2, 3, 2]) (by decide) s3122_0_2_3_2
  755. private theorem s3122_0_2_10_1 : Outcome [3, 1, 2, 2] [0, 2, 10, 1] true := Outcome.winning (q := [0, 1, 10, 1]) (by decide) s3122_0_1_10_1
  756. private theorem s3122_0_2_10_0 : Outcome [3, 1, 2, 2] [0, 2, 10, 0] true := Outcome.winning (q := [0, 0, 10, 0]) (by decide) s3122_0_0_10_0
  757. private theorem s3122_0_2_10_2 : Outcome [3, 1, 2, 2] [0, 2, 10, 2] false := by
  758. apply Outcome.losing (by decide)
  759. intro q hq
  760. have eqs : options [3, 1, 2, 2] [0, 2, 10, 2] = [[0, 1, 10, 2], [0, 0, 10, 2], [0, 2, 9, 2], [0, 2, 7, 2], [0, 2, 6, 2], [0, 2, 10, 1], [0, 2, 10, 0]] := by decide
  761. rw [eqs] at hq
  762. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  763. rcases hq with rfl | rfl | rfl | rfl | rfl | rfl | rfl
  764. · exact s3122_0_1_10_2
  765. · exact s3122_0_0_10_2
  766. · exact s3122_0_2_9_2
  767. · exact s3122_0_2_7_2
  768. · exact s3122_0_2_6_2
  769. · exact s3122_0_2_10_1
  770. · exact s3122_0_2_10_0
  771. private theorem s3122_0_2_13_2 : Outcome [3, 1, 2, 2] [0, 2, 13, 2] true := Outcome.winning (q := [0, 2, 10, 2]) (by decide) s3122_0_2_10_2
  772. private theorem s3122_0_0_12_2 : Outcome [3, 1, 2, 2] [0, 0, 12, 2] true := Outcome.winning (q := [0, 0, 9, 2]) (by decide) s3122_0_0_9_2
  773. private theorem s3122_1_0_4_0 : Outcome [3, 1, 2, 2] [1, 0, 4, 0] false := by
  774. apply Outcome.losing (by decide)
  775. intro q hq
  776. have eqs : options [3, 1, 2, 2] [1, 0, 4, 0] = [[0, 0, 4, 0], [1, 0, 3, 0], [1, 0, 1, 0]] := by decide
  777. rw [eqs] at hq
  778. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  779. rcases hq with rfl | rfl | rfl
  780. · exact s3122_0_0_4_0
  781. · exact s3122_1_0_3_0
  782. · exact s3122_1_0_1_0
  783. private theorem s3122_1_0_5_0 : Outcome [3, 1, 2, 2] [1, 0, 5, 0] true := Outcome.winning (q := [1, 0, 4, 0]) (by decide) s3122_1_0_4_0
  784. private theorem s3122_1_0_2_0 : Outcome [3, 1, 2, 2] [1, 0, 2, 0] true := Outcome.winning (q := [1, 0, 0, 0]) (by decide) s3122_1_0_0_0
  785. private theorem s3122_1_0_6_0 : Outcome [3, 1, 2, 2] [1, 0, 6, 0] false := by
  786. apply Outcome.losing (by decide)
  787. intro q hq
  788. have eqs : options [3, 1, 2, 2] [1, 0, 6, 0] = [[0, 0, 6, 0], [1, 0, 5, 0], [1, 0, 3, 0], [1, 0, 2, 0]] := by decide
  789. rw [eqs] at hq
  790. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  791. rcases hq with rfl | rfl | rfl | rfl
  792. · exact s3122_0_0_6_0
  793. · exact s3122_1_0_5_0
  794. · exact s3122_1_0_3_0
  795. · exact s3122_1_0_2_0
  796. private theorem s3122_1_0_7_0 : Outcome [3, 1, 2, 2] [1, 0, 7, 0] true := Outcome.winning (q := [1, 0, 6, 0]) (by decide) s3122_1_0_6_0
  797. private theorem s3122_1_0_11_0 : Outcome [3, 1, 2, 2] [1, 0, 11, 0] false := by
  798. apply Outcome.losing (by decide)
  799. intro q hq
  800. have eqs : options [3, 1, 2, 2] [1, 0, 11, 0] = [[0, 0, 11, 0], [1, 0, 10, 0], [1, 0, 8, 0], [1, 0, 7, 0]] := by decide
  801. rw [eqs] at hq
  802. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  803. rcases hq with rfl | rfl | rfl | rfl
  804. · exact s3122_0_0_11_0
  805. · exact s3122_1_0_10_0
  806. · exact s3122_1_0_8_0
  807. · exact s3122_1_0_7_0
  808. private theorem s3122_1_0_11_2 : Outcome [3, 1, 2, 2] [1, 0, 11, 2] true := Outcome.winning (q := [1, 0, 11, 0]) (by decide) s3122_1_0_11_0
  809. private theorem s3122_1_0_4_2 : Outcome [3, 1, 2, 2] [1, 0, 4, 2] true := Outcome.winning (q := [1, 0, 4, 0]) (by decide) s3122_1_0_4_0
  810. private theorem s3122_1_0_5_1 : Outcome [3, 1, 2, 2] [1, 0, 5, 1] true := Outcome.winning (q := [1, 0, 1, 1]) (by decide) s3122_1_0_1_1
  811. private theorem s3122_1_0_5_2 : Outcome [3, 1, 2, 2] [1, 0, 5, 2] false := by
  812. apply Outcome.losing (by decide)
  813. intro q hq
  814. have eqs : options [3, 1, 2, 2] [1, 0, 5, 2] = [[0, 0, 5, 2], [1, 0, 4, 2], [1, 0, 2, 2], [1, 0, 1, 2], [1, 0, 5, 1], [1, 0, 5, 0]] := by decide
  815. rw [eqs] at hq
  816. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  817. rcases hq with rfl | rfl | rfl | rfl | rfl | rfl
  818. · exact s3122_0_0_5_2
  819. · exact s3122_1_0_4_2
  820. · exact s3122_1_0_2_2
  821. · exact s3122_1_0_1_2
  822. · exact s3122_1_0_5_1
  823. · exact s3122_1_0_5_0
  824. private theorem s3122_1_0_8_2 : Outcome [3, 1, 2, 2] [1, 0, 8, 2] true := Outcome.winning (q := [1, 0, 5, 2]) (by decide) s3122_1_0_5_2
  825. private theorem s3122_1_0_7_1 : Outcome [3, 1, 2, 2] [1, 0, 7, 1] true := Outcome.winning (q := [1, 0, 3, 1]) (by decide) s3122_1_0_3_1
  826. private theorem s3122_1_0_8_1 : Outcome [3, 1, 2, 2] [1, 0, 8, 1] false := by
  827. apply Outcome.losing (by decide)
  828. intro q hq
  829. have eqs : options [3, 1, 2, 2] [1, 0, 8, 1] = [[0, 0, 8, 1], [1, 0, 7, 1], [1, 0, 5, 1], [1, 0, 4, 1], [1, 0, 8, 0]] := by decide
  830. rw [eqs] at hq
  831. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  832. rcases hq with rfl | rfl | rfl | rfl | rfl
  833. · exact s3122_0_0_8_1
  834. · exact s3122_1_0_7_1
  835. · exact s3122_1_0_5_1
  836. · exact s3122_1_0_4_1
  837. · exact s3122_1_0_8_0
  838. private theorem s3122_1_0_12_1 : Outcome [3, 1, 2, 2] [1, 0, 12, 1] true := Outcome.winning (q := [1, 0, 8, 1]) (by decide) s3122_1_0_8_1
  839. private theorem s3122_1_0_12_0 : Outcome [3, 1, 2, 2] [1, 0, 12, 0] true := Outcome.winning (q := [1, 0, 11, 0]) (by decide) s3122_1_0_11_0
  840. private theorem s3122_1_0_12_2 : Outcome [3, 1, 2, 2] [1, 0, 12, 2] false := by
  841. apply Outcome.losing (by decide)
  842. intro q hq
  843. have eqs : options [3, 1, 2, 2] [1, 0, 12, 2] = [[0, 0, 12, 2], [1, 0, 11, 2], [1, 0, 9, 2], [1, 0, 8, 2], [1, 0, 12, 1], [1, 0, 12, 0]] := by decide
  844. rw [eqs] at hq
  845. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  846. rcases hq with rfl | rfl | rfl | rfl | rfl | rfl
  847. · exact s3122_0_0_12_2
  848. · exact s3122_1_0_11_2
  849. · exact s3122_1_0_9_2
  850. · exact s3122_1_0_8_2
  851. · exact s3122_1_0_12_1
  852. · exact s3122_1_0_12_0
  853. private theorem s3122_1_0_13_2 : Outcome [3, 1, 2, 2] [1, 0, 13, 2] true := Outcome.winning (q := [1, 0, 12, 2]) (by decide) s3122_1_0_12_2
  854. private theorem s3122_1_2_12_2 : Outcome [3, 1, 2, 2] [1, 2, 12, 2] true := Outcome.winning (q := [1, 0, 12, 2]) (by decide) s3122_1_0_12_2
  855. private theorem s3122_1_2_10_2 : Outcome [3, 1, 2, 2] [1, 2, 10, 2] true := Outcome.winning (q := [0, 2, 10, 2]) (by decide) s3122_0_2_10_2
  856. private theorem s3122_1_2_9_2 : Outcome [3, 1, 2, 2] [1, 2, 9, 2] true := Outcome.winning (q := [1, 1, 9, 2]) (by decide) s3122_1_1_9_2
  857. private theorem s3122_1_2_13_1 : Outcome [3, 1, 2, 2] [1, 2, 13, 1] true := Outcome.winning (q := [1, 1, 13, 1]) (by decide) s3122_1_1_13_1
  858. private theorem s3122_1_0_9_0 : Outcome [3, 1, 2, 2] [1, 0, 9, 0] true := Outcome.winning (q := [1, 0, 6, 0]) (by decide) s3122_1_0_6_0
  859. private theorem s3122_1_0_13_0 : Outcome [3, 1, 2, 2] [1, 0, 13, 0] false := by
  860. apply Outcome.losing (by decide)
  861. intro q hq
  862. have eqs : options [3, 1, 2, 2] [1, 0, 13, 0] = [[0, 0, 13, 0], [1, 0, 12, 0], [1, 0, 10, 0], [1, 0, 9, 0]] := by decide
  863. rw [eqs] at hq
  864. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  865. rcases hq with rfl | rfl | rfl | rfl
  866. · exact s3122_0_0_13_0
  867. · exact s3122_1_0_12_0
  868. · exact s3122_1_0_10_0
  869. · exact s3122_1_0_9_0
  870. private theorem s3122_1_2_13_0 : Outcome [3, 1, 2, 2] [1, 2, 13, 0] true := Outcome.winning (q := [1, 0, 13, 0]) (by decide) s3122_1_0_13_0
  871. private theorem s3122_1_2_13_2 : Outcome [3, 1, 2, 2] [1, 2, 13, 2] false := by
  872. apply Outcome.losing (by decide)
  873. intro q hq
  874. have eqs : options [3, 1, 2, 2] [1, 2, 13, 2] = [[0, 2, 13, 2], [1, 1, 13, 2], [1, 0, 13, 2], [1, 2, 12, 2], [1, 2, 10, 2], [1, 2, 9, 2], [1, 2, 13, 1], [1, 2, 13, 0]] := by decide
  875. rw [eqs] at hq
  876. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  877. rcases hq with rfl | rfl | rfl | rfl | rfl | rfl | rfl | rfl
  878. · exact s3122_0_2_13_2
  879. · exact s3122_1_1_13_2
  880. · exact s3122_1_0_13_2
  881. · exact s3122_1_2_12_2
  882. · exact s3122_1_2_10_2
  883. · exact s3122_1_2_9_2
  884. · exact s3122_1_2_13_1
  885. · exact s3122_1_2_13_0
  886. private theorem s3122_2_2_13_2 : Outcome [3, 1, 2, 2] [2, 2, 13, 2] true := Outcome.winning (q := [1, 2, 13, 2]) (by decide) s3122_1_2_13_2
  887. private theorem s3122_0_2_11_2 : Outcome [3, 1, 2, 2] [0, 2, 11, 2] true := Outcome.winning (q := [0, 2, 10, 2]) (by decide) s3122_0_2_10_2
  888. private theorem s3122_0_1_8_2 : Outcome [3, 1, 2, 2] [0, 1, 8, 2] true := Outcome.winning (q := [0, 1, 5, 2]) (by decide) s3122_0_1_5_2
  889. private theorem s3122_0_2_5_2 : Outcome [3, 1, 2, 2] [0, 2, 5, 2] true := Outcome.winning (q := [0, 1, 5, 2]) (by decide) s3122_0_1_5_2
  890. private theorem s3122_0_2_8_1 : Outcome [3, 1, 2, 2] [0, 2, 8, 1] true := Outcome.winning (q := [0, 1, 8, 1]) (by decide) s3122_0_1_8_1
  891. private theorem s3122_0_2_8_0 : Outcome [3, 1, 2, 2] [0, 2, 8, 0] true := Outcome.winning (q := [0, 0, 8, 0]) (by decide) s3122_0_0_8_0
  892. private theorem s3122_0_2_8_2 : Outcome [3, 1, 2, 2] [0, 2, 8, 2] false := by
  893. apply Outcome.losing (by decide)
  894. intro q hq
  895. have eqs : options [3, 1, 2, 2] [0, 2, 8, 2] = [[0, 1, 8, 2], [0, 0, 8, 2], [0, 2, 7, 2], [0, 2, 5, 2], [0, 2, 4, 2], [0, 2, 8, 1], [0, 2, 8, 0]] := by decide
  896. rw [eqs] at hq
  897. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  898. rcases hq with rfl | rfl | rfl | rfl | rfl | rfl | rfl
  899. · exact s3122_0_1_8_2
  900. · exact s3122_0_0_8_2
  901. · exact s3122_0_2_7_2
  902. · exact s3122_0_2_5_2
  903. · exact s3122_0_2_4_2
  904. · exact s3122_0_2_8_1
  905. · exact s3122_0_2_8_0
  906. private theorem s3122_1_2_8_2 : Outcome [3, 1, 2, 2] [1, 2, 8, 2] true := Outcome.winning (q := [0, 2, 8, 2]) (by decide) s3122_0_2_8_2
  907. private theorem s3122_1_2_7_2 : Outcome [3, 1, 2, 2] [1, 2, 7, 2] true := Outcome.winning (q := [1, 1, 7, 2]) (by decide) s3122_1_1_7_2
  908. private theorem s3122_1_2_11_1 : Outcome [3, 1, 2, 2] [1, 2, 11, 1] true := Outcome.winning (q := [1, 1, 11, 1]) (by decide) s3122_1_1_11_1
  909. private theorem s3122_1_2_11_0 : Outcome [3, 1, 2, 2] [1, 2, 11, 0] true := Outcome.winning (q := [1, 0, 11, 0]) (by decide) s3122_1_0_11_0
  910. private theorem s3122_1_2_11_2 : Outcome [3, 1, 2, 2] [1, 2, 11, 2] false := by
  911. apply Outcome.losing (by decide)
  912. intro q hq
  913. have eqs : options [3, 1, 2, 2] [1, 2, 11, 2] = [[0, 2, 11, 2], [1, 1, 11, 2], [1, 0, 11, 2], [1, 2, 10, 2], [1, 2, 8, 2], [1, 2, 7, 2], [1, 2, 11, 1], [1, 2, 11, 0]] := by decide
  914. rw [eqs] at hq
  915. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  916. rcases hq with rfl | rfl | rfl | rfl | rfl | rfl | rfl | rfl
  917. · exact s3122_0_2_11_2
  918. · exact s3122_1_1_11_2
  919. · exact s3122_1_0_11_2
  920. · exact s3122_1_2_10_2
  921. · exact s3122_1_2_8_2
  922. · exact s3122_1_2_7_2
  923. · exact s3122_1_2_11_1
  924. · exact s3122_1_2_11_0
  925. private theorem s3122_2_2_11_2 : Outcome [3, 1, 2, 2] [2, 2, 11, 2] true := Outcome.winning (q := [1, 2, 11, 2]) (by decide) s3122_1_2_11_2
  926. private theorem s3122_2_2_10_2 : Outcome [3, 1, 2, 2] [2, 2, 10, 2] true := Outcome.winning (q := [0, 2, 10, 2]) (by decide) s3122_0_2_10_2
  927. private theorem s3122_0_1_14_0 : Outcome [3, 1, 2, 2] [0, 1, 14, 0] true := Outcome.winning (q := [0, 1, 13, 0]) (by decide) s3122_0_1_13_0
  928. private theorem s3122_0_2_13_0 : Outcome [3, 1, 2, 2] [0, 2, 13, 0] true := Outcome.winning (q := [0, 1, 13, 0]) (by decide) s3122_0_1_13_0
  929. private theorem s3122_0_2_11_0 : Outcome [3, 1, 2, 2] [0, 2, 11, 0] true := Outcome.winning (q := [0, 1, 11, 0]) (by decide) s3122_0_1_11_0
  930. private theorem s3122_0_2_14_0 : Outcome [3, 1, 2, 2] [0, 2, 14, 0] false := by
  931. apply Outcome.losing (by decide)
  932. intro q hq
  933. have eqs : options [3, 1, 2, 2] [0, 2, 14, 0] = [[0, 1, 14, 0], [0, 0, 14, 0], [0, 2, 13, 0], [0, 2, 11, 0], [0, 2, 10, 0]] := by decide
  934. rw [eqs] at hq
  935. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  936. rcases hq with rfl | rfl | rfl | rfl | rfl
  937. · exact s3122_0_1_14_0
  938. · exact s3122_0_0_14_0
  939. · exact s3122_0_2_13_0
  940. · exact s3122_0_2_11_0
  941. · exact s3122_0_2_10_0
  942. private theorem s3122_0_2_14_1 : Outcome [3, 1, 2, 2] [0, 2, 14, 1] true := Outcome.winning (q := [0, 2, 14, 0]) (by decide) s3122_0_2_14_0
  943. private theorem s3122_1_0_9_1 : Outcome [3, 1, 2, 2] [1, 0, 9, 1] true := Outcome.winning (q := [1, 0, 8, 1]) (by decide) s3122_1_0_8_1
  944. private theorem s3122_1_0_10_1 : Outcome [3, 1, 2, 2] [1, 0, 10, 1] false := by
  945. apply Outcome.losing (by decide)
  946. intro q hq
  947. have eqs : options [3, 1, 2, 2] [1, 0, 10, 1] = [[0, 0, 10, 1], [1, 0, 9, 1], [1, 0, 7, 1], [1, 0, 6, 1], [1, 0, 10, 0]] := by decide
  948. rw [eqs] at hq
  949. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  950. rcases hq with rfl | rfl | rfl | rfl | rfl
  951. · exact s3122_0_0_10_1
  952. · exact s3122_1_0_9_1
  953. · exact s3122_1_0_7_1
  954. · exact s3122_1_0_6_1
  955. · exact s3122_1_0_10_0
  956. private theorem s3122_1_0_14_1 : Outcome [3, 1, 2, 2] [1, 0, 14, 1] true := Outcome.winning (q := [1, 0, 10, 1]) (by decide) s3122_1_0_10_1
  957. private theorem s3122_1_2_10_1 : Outcome [3, 1, 2, 2] [1, 2, 10, 1] true := Outcome.winning (q := [1, 0, 10, 1]) (by decide) s3122_1_0_10_1
  958. private theorem s3122_1_2_14_0 : Outcome [3, 1, 2, 2] [1, 2, 14, 0] true := Outcome.winning (q := [0, 2, 14, 0]) (by decide) s3122_0_2_14_0
  959. private theorem s3122_1_2_14_1 : Outcome [3, 1, 2, 2] [1, 2, 14, 1] false := by
  960. apply Outcome.losing (by decide)
  961. intro q hq
  962. have eqs : options [3, 1, 2, 2] [1, 2, 14, 1] = [[0, 2, 14, 1], [1, 1, 14, 1], [1, 0, 14, 1], [1, 2, 13, 1], [1, 2, 11, 1], [1, 2, 10, 1], [1, 2, 14, 0]] := by decide
  963. rw [eqs] at hq
  964. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  965. rcases hq with rfl | rfl | rfl | rfl | rfl | rfl | rfl
  966. · exact s3122_0_2_14_1
  967. · exact s3122_1_1_14_1
  968. · exact s3122_1_0_14_1
  969. · exact s3122_1_2_13_1
  970. · exact s3122_1_2_11_1
  971. · exact s3122_1_2_10_1
  972. · exact s3122_1_2_14_0
  973. private theorem s3122_2_2_14_1 : Outcome [3, 1, 2, 2] [2, 2, 14, 1] true := Outcome.winning (q := [1, 2, 14, 1]) (by decide) s3122_1_2_14_1
  974. private theorem s3122_2_2_14_0 : Outcome [3, 1, 2, 2] [2, 2, 14, 0] true := Outcome.winning (q := [0, 2, 14, 0]) (by decide) s3122_0_2_14_0
  975. private theorem s3122_2_2_14_2 : Outcome [3, 1, 2, 2] [2, 2, 14, 2] false := by
  976. apply Outcome.losing (by decide)
  977. intro q hq
  978. have eqs : options [3, 1, 2, 2] [2, 2, 14, 2] = [[1, 2, 14, 2], [0, 2, 14, 2], [2, 1, 14, 2], [2, 0, 14, 2], [2, 2, 13, 2], [2, 2, 11, 2], [2, 2, 10, 2], [2, 2, 14, 1], [2, 2, 14, 0]] := by decide
  979. rw [eqs] at hq
  980. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  981. rcases hq with rfl | rfl | rfl | rfl | rfl | rfl | rfl | rfl | rfl
  982. · exact s3122_1_2_14_2
  983. · exact s3122_0_2_14_2
  984. · exact s3122_2_1_14_2
  985. · exact s3122_2_0_14_2
  986. · exact s3122_2_2_13_2
  987. · exact s3122_2_2_11_2
  988. · exact s3122_2_2_10_2
  989. · exact s3122_2_2_14_1
  990. · exact s3122_2_2_14_0
  991. def features (x y : Nat) : Nat × Nat × Bool :=
  992. (x % 7, y % 7, decide (max x y - min x y ≤ 4))
  993. def conjecture41 : Prop :=
  994. ∀ x y u v, features x y = features u v →
  995. (Outcome [3,1,2,2] [2,2,x,y] false ↔ Outcome [3,1,2,2] [2,2,u,v] false)
  996. theorem liang_conjecture41_counterexample : ¬ conjecture41 := by
  997. intro h
  998. have same : features 7 2 = features 14 2 := by decide
  999. have leftP : Outcome [3,1,2,2] [2,2,7,2] false := (h 7 2 14 2 same).mpr s3122_2_2_14_2
  1000. exact Bool.false_ne_true (outcome_unique s3122_2_2_7_2 leftP).symm
  1001. end Quaternary