Lean / Reader
Lean reader

Verification.lean

1,326 lines268 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 s3102_0_0_0_0 : Outcome [3, 1, 0, 2] [0, 0, 0, 0] true := Outcome.terminal (by decide)
  44. private theorem s3102_0_0_0_1 : Outcome [3, 1, 0, 2] [0, 0, 0, 1] false := by
  45. apply Outcome.losing (by decide)
  46. intro q hq
  47. have eqs : options [3, 1, 0, 2] [0, 0, 0, 1] = [[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 s3102_0_0_0_0
  52. private theorem s3102_0_0_1_1 : Outcome [3, 1, 0, 2] [0, 0, 1, 1] true := Outcome.winning (q := [0, 0, 0, 1]) (by decide) s3102_0_0_0_1
  53. private theorem s3102_0_1_0_1 : Outcome [3, 1, 0, 2] [0, 1, 0, 1] true := Outcome.winning (q := [0, 0, 0, 1]) (by decide) s3102_0_0_0_1
  54. private theorem s3102_0_0_1_0 : Outcome [3, 1, 0, 2] [0, 0, 1, 0] false := by
  55. apply Outcome.losing (by decide)
  56. intro q hq
  57. have eqs : options [3, 1, 0, 2] [0, 0, 1, 0] = [[0, 0, 0, 0]] := by decide
  58. rw [eqs] at hq
  59. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  60. subst q
  61. exact s3102_0_0_0_0
  62. private theorem s3102_0_1_1_0 : Outcome [3, 1, 0, 2] [0, 1, 1, 0] true := Outcome.winning (q := [0, 0, 1, 0]) (by decide) s3102_0_0_1_0
  63. private theorem s3102_0_1_1_1 : Outcome [3, 1, 0, 2] [0, 1, 1, 1] false := by
  64. apply Outcome.losing (by decide)
  65. intro q hq
  66. have eqs : options [3, 1, 0, 2] [0, 1, 1, 1] = [[0, 0, 1, 1], [0, 1, 0, 1], [0, 1, 1, 0]] := by decide
  67. rw [eqs] at hq
  68. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  69. rcases hq with rfl | rfl | rfl
  70. · exact s3102_0_0_1_1
  71. · exact s3102_0_1_0_1
  72. · exact s3102_0_1_1_0
  73. private theorem s3102_2_1_1_1 : Outcome [3, 1, 0, 2] [2, 1, 1, 1] true := Outcome.winning (q := [0, 1, 1, 1]) (by decide) s3102_0_1_1_1
  74. private theorem s3102_1_0_0_1 : Outcome [3, 1, 0, 2] [1, 0, 0, 1] true := Outcome.winning (q := [0, 0, 0, 1]) (by decide) s3102_0_0_0_1
  75. private theorem s3102_1_0_1_0 : Outcome [3, 1, 0, 2] [1, 0, 1, 0] true := Outcome.winning (q := [0, 0, 1, 0]) (by decide) s3102_0_0_1_0
  76. private theorem s3102_1_0_1_1 : Outcome [3, 1, 0, 2] [1, 0, 1, 1] false := by
  77. apply Outcome.losing (by decide)
  78. intro q hq
  79. have eqs : options [3, 1, 0, 2] [1, 0, 1, 1] = [[0, 0, 1, 1], [1, 0, 0, 1], [1, 0, 1, 0]] := by decide
  80. rw [eqs] at hq
  81. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  82. rcases hq with rfl | rfl | rfl
  83. · exact s3102_0_0_1_1
  84. · exact s3102_1_0_0_1
  85. · exact s3102_1_0_1_0
  86. private theorem s3102_5_0_1_1 : Outcome [3, 1, 0, 2] [5, 0, 1, 1] true := Outcome.winning (q := [1, 0, 1, 1]) (by decide) s3102_1_0_1_1
  87. private theorem s3102_2_0_1_1 : Outcome [3, 1, 0, 2] [2, 0, 1, 1] true := Outcome.winning (q := [1, 0, 1, 1]) (by decide) s3102_1_0_1_1
  88. private theorem s3102_1_0_0_0 : Outcome [3, 1, 0, 2] [1, 0, 0, 0] false := by
  89. apply Outcome.losing (by decide)
  90. intro q hq
  91. have eqs : options [3, 1, 0, 2] [1, 0, 0, 0] = [[0, 0, 0, 0]] := by decide
  92. rw [eqs] at hq
  93. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  94. subst q
  95. exact s3102_0_0_0_0
  96. private theorem s3102_5_0_0_0 : Outcome [3, 1, 0, 2] [5, 0, 0, 0] true := Outcome.winning (q := [1, 0, 0, 0]) (by decide) s3102_1_0_0_0
  97. private theorem s3102_2_0_0_0 : Outcome [3, 1, 0, 2] [2, 0, 0, 0] true := Outcome.winning (q := [1, 0, 0, 0]) (by decide) s3102_1_0_0_0
  98. private theorem s3102_6_0_0_0 : Outcome [3, 1, 0, 2] [6, 0, 0, 0] false := by
  99. apply Outcome.losing (by decide)
  100. intro q hq
  101. have eqs : options [3, 1, 0, 2] [6, 0, 0, 0] = [[5, 0, 0, 0], [2, 0, 0, 0]] := by decide
  102. rw [eqs] at hq
  103. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  104. rcases hq with rfl | rfl
  105. · exact s3102_5_0_0_0
  106. · exact s3102_2_0_0_0
  107. private theorem s3102_6_0_0_1 : Outcome [3, 1, 0, 2] [6, 0, 0, 1] true := Outcome.winning (q := [6, 0, 0, 0]) (by decide) s3102_6_0_0_0
  108. private theorem s3102_6_0_1_0 : Outcome [3, 1, 0, 2] [6, 0, 1, 0] true := Outcome.winning (q := [6, 0, 0, 0]) (by decide) s3102_6_0_0_0
  109. private theorem s3102_6_0_1_1 : Outcome [3, 1, 0, 2] [6, 0, 1, 1] false := by
  110. apply Outcome.losing (by decide)
  111. intro q hq
  112. have eqs : options [3, 1, 0, 2] [6, 0, 1, 1] = [[5, 0, 1, 1], [2, 0, 1, 1], [6, 0, 0, 1], [6, 0, 1, 0]] := by decide
  113. rw [eqs] at hq
  114. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  115. rcases hq with rfl | rfl | rfl | rfl
  116. · exact s3102_5_0_1_1
  117. · exact s3102_2_0_1_1
  118. · exact s3102_6_0_0_1
  119. · exact s3102_6_0_1_0
  120. private theorem s3102_6_1_1_1 : Outcome [3, 1, 0, 2] [6, 1, 1, 1] true := Outcome.winning (q := [6, 0, 1, 1]) (by decide) s3102_6_0_1_1
  121. private theorem s3102_3_0_0_0 : Outcome [3, 1, 0, 2] [3, 0, 0, 0] false := by
  122. apply Outcome.losing (by decide)
  123. intro q hq
  124. have eqs : options [3, 1, 0, 2] [3, 0, 0, 0] = [[2, 0, 0, 0]] := by decide
  125. rw [eqs] at hq
  126. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  127. subst q
  128. exact s3102_2_0_0_0
  129. private theorem s3102_3_0_0_1 : Outcome [3, 1, 0, 2] [3, 0, 0, 1] true := Outcome.winning (q := [3, 0, 0, 0]) (by decide) s3102_3_0_0_0
  130. private theorem s3102_3_0_1_0 : Outcome [3, 1, 0, 2] [3, 0, 1, 0] true := Outcome.winning (q := [3, 0, 0, 0]) (by decide) s3102_3_0_0_0
  131. private theorem s3102_3_0_1_1 : Outcome [3, 1, 0, 2] [3, 0, 1, 1] false := by
  132. apply Outcome.losing (by decide)
  133. intro q hq
  134. have eqs : options [3, 1, 0, 2] [3, 0, 1, 1] = [[2, 0, 1, 1], [3, 0, 0, 1], [3, 0, 1, 0]] := by decide
  135. rw [eqs] at hq
  136. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  137. rcases hq with rfl | rfl | rfl
  138. · exact s3102_2_0_1_1
  139. · exact s3102_3_0_0_1
  140. · exact s3102_3_0_1_0
  141. private theorem s3102_3_1_1_1 : Outcome [3, 1, 0, 2] [3, 1, 1, 1] true := Outcome.winning (q := [3, 0, 1, 1]) (by decide) s3102_3_0_1_1
  142. private theorem s3102_7_0_1_1 : Outcome [3, 1, 0, 2] [7, 0, 1, 1] true := Outcome.winning (q := [6, 0, 1, 1]) (by decide) s3102_6_0_1_1
  143. private theorem s3102_0_1_0_0 : Outcome [3, 1, 0, 2] [0, 1, 0, 0] false := by
  144. apply Outcome.losing (by decide)
  145. intro q hq
  146. have eqs : options [3, 1, 0, 2] [0, 1, 0, 0] = [[0, 0, 0, 0]] := by decide
  147. rw [eqs] at hq
  148. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  149. subst q
  150. exact s3102_0_0_0_0
  151. private theorem s3102_1_1_0_0 : Outcome [3, 1, 0, 2] [1, 1, 0, 0] true := Outcome.winning (q := [0, 1, 0, 0]) (by decide) s3102_0_1_0_0
  152. private theorem s3102_1_1_0_1 : Outcome [3, 1, 0, 2] [1, 1, 0, 1] false := by
  153. apply Outcome.losing (by decide)
  154. intro q hq
  155. have eqs : options [3, 1, 0, 2] [1, 1, 0, 1] = [[0, 1, 0, 1], [1, 0, 0, 1], [1, 1, 0, 0]] := by decide
  156. rw [eqs] at hq
  157. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  158. rcases hq with rfl | rfl | rfl
  159. · exact s3102_0_1_0_1
  160. · exact s3102_1_0_0_1
  161. · exact s3102_1_1_0_0
  162. private theorem s3102_5_1_0_1 : Outcome [3, 1, 0, 2] [5, 1, 0, 1] true := Outcome.winning (q := [1, 1, 0, 1]) (by decide) s3102_1_1_0_1
  163. private theorem s3102_2_1_0_1 : Outcome [3, 1, 0, 2] [2, 1, 0, 1] true := Outcome.winning (q := [1, 1, 0, 1]) (by decide) s3102_1_1_0_1
  164. private theorem s3102_6_1_0_0 : Outcome [3, 1, 0, 2] [6, 1, 0, 0] true := Outcome.winning (q := [6, 0, 0, 0]) (by decide) s3102_6_0_0_0
  165. private theorem s3102_6_1_0_1 : Outcome [3, 1, 0, 2] [6, 1, 0, 1] false := by
  166. apply Outcome.losing (by decide)
  167. intro q hq
  168. have eqs : options [3, 1, 0, 2] [6, 1, 0, 1] = [[5, 1, 0, 1], [2, 1, 0, 1], [6, 0, 0, 1], [6, 1, 0, 0]] := by decide
  169. rw [eqs] at hq
  170. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  171. rcases hq with rfl | rfl | rfl | rfl
  172. · exact s3102_5_1_0_1
  173. · exact s3102_2_1_0_1
  174. · exact s3102_6_0_0_1
  175. · exact s3102_6_1_0_0
  176. private theorem s3102_7_1_0_1 : Outcome [3, 1, 0, 2] [7, 1, 0, 1] true := Outcome.winning (q := [6, 1, 0, 1]) (by decide) s3102_6_1_0_1
  177. private theorem s3102_1_1_1_0 : Outcome [3, 1, 0, 2] [1, 1, 1, 0] false := by
  178. apply Outcome.losing (by decide)
  179. intro q hq
  180. have eqs : options [3, 1, 0, 2] [1, 1, 1, 0] = [[0, 1, 1, 0], [1, 0, 1, 0], [1, 1, 0, 0]] := by decide
  181. rw [eqs] at hq
  182. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  183. rcases hq with rfl | rfl | rfl
  184. · exact s3102_0_1_1_0
  185. · exact s3102_1_0_1_0
  186. · exact s3102_1_1_0_0
  187. private theorem s3102_5_1_1_0 : Outcome [3, 1, 0, 2] [5, 1, 1, 0] true := Outcome.winning (q := [1, 1, 1, 0]) (by decide) s3102_1_1_1_0
  188. private theorem s3102_2_1_1_0 : Outcome [3, 1, 0, 2] [2, 1, 1, 0] true := Outcome.winning (q := [1, 1, 1, 0]) (by decide) s3102_1_1_1_0
  189. private theorem s3102_6_1_1_0 : Outcome [3, 1, 0, 2] [6, 1, 1, 0] false := by
  190. apply Outcome.losing (by decide)
  191. intro q hq
  192. have eqs : options [3, 1, 0, 2] [6, 1, 1, 0] = [[5, 1, 1, 0], [2, 1, 1, 0], [6, 0, 1, 0], [6, 1, 0, 0]] := by decide
  193. rw [eqs] at hq
  194. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  195. rcases hq with rfl | rfl | rfl | rfl
  196. · exact s3102_5_1_1_0
  197. · exact s3102_2_1_1_0
  198. · exact s3102_6_0_1_0
  199. · exact s3102_6_1_0_0
  200. private theorem s3102_7_1_1_0 : Outcome [3, 1, 0, 2] [7, 1, 1, 0] true := Outcome.winning (q := [6, 1, 1, 0]) (by decide) s3102_6_1_1_0
  201. private theorem s3102_7_1_1_1 : Outcome [3, 1, 0, 2] [7, 1, 1, 1] false := by
  202. apply Outcome.losing (by decide)
  203. intro q hq
  204. have eqs : options [3, 1, 0, 2] [7, 1, 1, 1] = [[6, 1, 1, 1], [3, 1, 1, 1], [7, 0, 1, 1], [7, 1, 0, 1], [7, 1, 1, 0]] := by decide
  205. rw [eqs] at hq
  206. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  207. rcases hq with rfl | rfl | rfl | rfl | rfl
  208. · exact s3102_6_1_1_1
  209. · exact s3102_3_1_1_1
  210. · exact s3102_7_0_1_1
  211. · exact s3102_7_1_0_1
  212. · exact s3102_7_1_1_0
  213. private theorem s3122_0_0_0_0 : Outcome [3, 1, 2, 2] [0, 0, 0, 0] true := Outcome.terminal (by decide)
  214. private theorem s3122_0_0_1_0 : Outcome [3, 1, 2, 2] [0, 0, 1, 0] false := by
  215. apply Outcome.losing (by decide)
  216. intro q hq
  217. have eqs : options [3, 1, 2, 2] [0, 0, 1, 0] = [[0, 0, 0, 0]] := by decide
  218. rw [eqs] at hq
  219. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  220. subst q
  221. exact s3122_0_0_0_0
  222. 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
  223. private theorem s3122_0_0_0_1 : Outcome [3, 1, 2, 2] [0, 0, 0, 1] false := by
  224. apply Outcome.losing (by decide)
  225. intro q hq
  226. have eqs : options [3, 1, 2, 2] [0, 0, 0, 1] = [[0, 0, 0, 0]] := by decide
  227. rw [eqs] at hq
  228. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  229. subst q
  230. exact s3122_0_0_0_0
  231. 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
  232. 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
  233. 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
  234. private theorem s3122_0_0_2_2 : Outcome [3, 1, 2, 2] [0, 0, 2, 2] false := by
  235. apply Outcome.losing (by decide)
  236. intro q hq
  237. 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
  238. rw [eqs] at hq
  239. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  240. rcases hq with rfl | rfl | rfl | rfl
  241. · exact s3122_0_0_1_2
  242. · exact s3122_0_0_0_2
  243. · exact s3122_0_0_2_1
  244. · exact s3122_0_0_2_0
  245. 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
  246. 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
  247. 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
  248. 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
  249. private theorem s3122_0_1_0_0 : Outcome [3, 1, 2, 2] [0, 1, 0, 0] false := by
  250. apply Outcome.losing (by decide)
  251. intro q hq
  252. have eqs : options [3, 1, 2, 2] [0, 1, 0, 0] = [[0, 0, 0, 0]] := by decide
  253. rw [eqs] at hq
  254. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  255. subst q
  256. exact s3122_0_0_0_0
  257. 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
  258. private theorem s3122_1_1_1_0 : Outcome [3, 1, 2, 2] [1, 1, 1, 0] false := by
  259. apply Outcome.losing (by decide)
  260. intro q hq
  261. 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
  262. rw [eqs] at hq
  263. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  264. rcases hq with rfl | rfl | rfl
  265. · exact s3122_0_1_1_0
  266. · exact s3122_1_0_1_0
  267. · exact s3122_1_1_0_0
  268. 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
  269. 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
  270. 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
  271. private theorem s3122_1_1_0_1 : Outcome [3, 1, 2, 2] [1, 1, 0, 1] false := by
  272. apply Outcome.losing (by decide)
  273. intro q hq
  274. 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
  275. rw [eqs] at hq
  276. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  277. rcases hq with rfl | rfl | rfl
  278. · exact s3122_0_1_0_1
  279. · exact s3122_1_0_0_1
  280. · exact s3122_1_1_0_0
  281. 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
  282. 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
  283. 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
  284. private theorem s3122_1_1_2_2 : Outcome [3, 1, 2, 2] [1, 1, 2, 2] false := by
  285. apply Outcome.losing (by decide)
  286. intro q hq
  287. 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
  288. rw [eqs] at hq
  289. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  290. rcases hq with rfl | rfl | rfl | rfl | rfl | rfl
  291. · exact s3122_0_1_2_2
  292. · exact s3122_1_0_2_2
  293. · exact s3122_1_1_1_2
  294. · exact s3122_1_1_0_2
  295. · exact s3122_1_1_2_1
  296. · exact s3122_1_1_2_0
  297. 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
  298. 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
  299. private theorem s3122_1_0_1_1 : Outcome [3, 1, 2, 2] [1, 0, 1, 1] false := by
  300. apply Outcome.losing (by decide)
  301. intro q hq
  302. 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
  303. rw [eqs] at hq
  304. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  305. rcases hq with rfl | rfl | rfl
  306. · exact s3122_0_0_1_1
  307. · exact s3122_1_0_0_1
  308. · exact s3122_1_0_1_0
  309. 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
  310. private theorem s3122_1_0_0_0 : Outcome [3, 1, 2, 2] [1, 0, 0, 0] false := by
  311. apply Outcome.losing (by decide)
  312. intro q hq
  313. have eqs : options [3, 1, 2, 2] [1, 0, 0, 0] = [[0, 0, 0, 0]] := by decide
  314. rw [eqs] at hq
  315. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  316. subst q
  317. exact s3122_0_0_0_0
  318. 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
  319. private theorem s3122_3_0_0_0 : Outcome [3, 1, 2, 2] [3, 0, 0, 0] false := by
  320. apply Outcome.losing (by decide)
  321. intro q hq
  322. have eqs : options [3, 1, 2, 2] [3, 0, 0, 0] = [[2, 0, 0, 0]] := by decide
  323. rw [eqs] at hq
  324. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  325. subst q
  326. exact s3122_2_0_0_0
  327. private theorem s3122_3_0_0_1 : Outcome [3, 1, 2, 2] [3, 0, 0, 1] true := Outcome.winning (q := [3, 0, 0, 0]) (by decide) s3122_3_0_0_0
  328. private theorem s3122_3_0_1_0 : Outcome [3, 1, 2, 2] [3, 0, 1, 0] true := Outcome.winning (q := [3, 0, 0, 0]) (by decide) s3122_3_0_0_0
  329. private theorem s3122_3_0_1_1 : Outcome [3, 1, 2, 2] [3, 0, 1, 1] false := by
  330. apply Outcome.losing (by decide)
  331. intro q hq
  332. have eqs : options [3, 1, 2, 2] [3, 0, 1, 1] = [[2, 0, 1, 1], [3, 0, 0, 1], [3, 0, 1, 0]] := by decide
  333. rw [eqs] at hq
  334. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  335. rcases hq with rfl | rfl | rfl
  336. · exact s3122_2_0_1_1
  337. · exact s3122_3_0_0_1
  338. · exact s3122_3_0_1_0
  339. private theorem s3122_3_0_1_2 : Outcome [3, 1, 2, 2] [3, 0, 1, 2] true := Outcome.winning (q := [3, 0, 1, 1]) (by decide) s3122_3_0_1_1
  340. 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
  341. 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
  342. private theorem s3122_2_0_0_2 : Outcome [3, 1, 2, 2] [2, 0, 0, 2] false := by
  343. apply Outcome.losing (by decide)
  344. intro q hq
  345. 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
  346. rw [eqs] at hq
  347. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  348. rcases hq with rfl | rfl | rfl | rfl
  349. · exact s3122_1_0_0_2
  350. · exact s3122_0_0_0_2
  351. · exact s3122_2_0_0_1
  352. · exact s3122_2_0_0_0
  353. private theorem s3122_3_0_0_2 : Outcome [3, 1, 2, 2] [3, 0, 0, 2] true := Outcome.winning (q := [2, 0, 0, 2]) (by decide) s3122_2_0_0_2
  354. private theorem s3122_3_0_2_1 : Outcome [3, 1, 2, 2] [3, 0, 2, 1] true := Outcome.winning (q := [3, 0, 1, 1]) (by decide) s3122_3_0_1_1
  355. 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
  356. private theorem s3122_2_0_1_0 : Outcome [3, 1, 2, 2] [2, 0, 1, 0] true := Outcome.winning (q := [0, 0, 1, 0]) (by decide) s3122_0_0_1_0
  357. private theorem s3122_2_0_2_0 : Outcome [3, 1, 2, 2] [2, 0, 2, 0] false := by
  358. apply Outcome.losing (by decide)
  359. intro q hq
  360. have eqs : options [3, 1, 2, 2] [2, 0, 2, 0] = [[1, 0, 2, 0], [0, 0, 2, 0], [2, 0, 1, 0], [2, 0, 0, 0]] := by decide
  361. rw [eqs] at hq
  362. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  363. rcases hq with rfl | rfl | rfl | rfl
  364. · exact s3122_1_0_2_0
  365. · exact s3122_0_0_2_0
  366. · exact s3122_2_0_1_0
  367. · exact s3122_2_0_0_0
  368. private theorem s3122_3_0_2_0 : Outcome [3, 1, 2, 2] [3, 0, 2, 0] true := Outcome.winning (q := [2, 0, 2, 0]) (by decide) s3122_2_0_2_0
  369. private theorem s3122_3_0_2_2 : Outcome [3, 1, 2, 2] [3, 0, 2, 2] false := by
  370. apply Outcome.losing (by decide)
  371. intro q hq
  372. have eqs : options [3, 1, 2, 2] [3, 0, 2, 2] = [[2, 0, 2, 2], [3, 0, 1, 2], [3, 0, 0, 2], [3, 0, 2, 1], [3, 0, 2, 0]] := by decide
  373. rw [eqs] at hq
  374. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  375. rcases hq with rfl | rfl | rfl | rfl | rfl
  376. · exact s3122_2_0_2_2
  377. · exact s3122_3_0_1_2
  378. · exact s3122_3_0_0_2
  379. · exact s3122_3_0_2_1
  380. · exact s3122_3_0_2_0
  381. private theorem s3122_7_0_2_2 : Outcome [3, 1, 2, 2] [7, 0, 2, 2] true := Outcome.winning (q := [3, 0, 2, 2]) (by decide) s3122_3_0_2_2
  382. private theorem s3122_4_0_0_0 : Outcome [3, 1, 2, 2] [4, 0, 0, 0] true := Outcome.winning (q := [3, 0, 0, 0]) (by decide) s3122_3_0_0_0
  383. private theorem s3122_4_0_1_0 : Outcome [3, 1, 2, 2] [4, 0, 1, 0] false := by
  384. apply Outcome.losing (by decide)
  385. intro q hq
  386. have eqs : options [3, 1, 2, 2] [4, 0, 1, 0] = [[3, 0, 1, 0], [1, 0, 1, 0], [4, 0, 0, 0]] := by decide
  387. rw [eqs] at hq
  388. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  389. rcases hq with rfl | rfl | rfl
  390. · exact s3122_3_0_1_0
  391. · exact s3122_1_0_1_0
  392. · exact s3122_4_0_0_0
  393. private theorem s3122_4_0_1_2 : Outcome [3, 1, 2, 2] [4, 0, 1, 2] true := Outcome.winning (q := [4, 0, 1, 0]) (by decide) s3122_4_0_1_0
  394. 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
  395. 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
  396. private theorem s3122_5_0_0_2 : Outcome [3, 1, 2, 2] [5, 0, 0, 2] true := Outcome.winning (q := [2, 0, 0, 2]) (by decide) s3122_2_0_0_2
  397. private theorem s3122_5_0_1_1 : Outcome [3, 1, 2, 2] [5, 0, 1, 1] true := Outcome.winning (q := [1, 0, 1, 1]) (by decide) s3122_1_0_1_1
  398. private theorem s3122_5_0_1_0 : Outcome [3, 1, 2, 2] [5, 0, 1, 0] true := Outcome.winning (q := [4, 0, 1, 0]) (by decide) s3122_4_0_1_0
  399. private theorem s3122_5_0_1_2 : Outcome [3, 1, 2, 2] [5, 0, 1, 2] false := by
  400. apply Outcome.losing (by decide)
  401. intro q hq
  402. have eqs : options [3, 1, 2, 2] [5, 0, 1, 2] = [[4, 0, 1, 2], [2, 0, 1, 2], [1, 0, 1, 2], [5, 0, 0, 2], [5, 0, 1, 1], [5, 0, 1, 0]] := by decide
  403. rw [eqs] at hq
  404. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  405. rcases hq with rfl | rfl | rfl | rfl | rfl | rfl
  406. · exact s3122_4_0_1_2
  407. · exact s3122_2_0_1_2
  408. · exact s3122_1_0_1_2
  409. · exact s3122_5_0_0_2
  410. · exact s3122_5_0_1_1
  411. · exact s3122_5_0_1_0
  412. private theorem s3122_5_0_2_2 : Outcome [3, 1, 2, 2] [5, 0, 2, 2] true := Outcome.winning (q := [5, 0, 1, 2]) (by decide) s3122_5_0_1_2
  413. private theorem s3122_4_0_2_2 : Outcome [3, 1, 2, 2] [4, 0, 2, 2] true := Outcome.winning (q := [3, 0, 2, 2]) (by decide) s3122_3_0_2_2
  414. private theorem s3122_8_0_1_2 : Outcome [3, 1, 2, 2] [8, 0, 1, 2] true := Outcome.winning (q := [5, 0, 1, 2]) (by decide) s3122_5_0_1_2
  415. private theorem s3122_6_0_0_2 : Outcome [3, 1, 2, 2] [6, 0, 0, 2] true := Outcome.winning (q := [2, 0, 0, 2]) (by decide) s3122_2_0_0_2
  416. private theorem s3122_4_0_0_1 : Outcome [3, 1, 2, 2] [4, 0, 0, 1] false := by
  417. apply Outcome.losing (by decide)
  418. intro q hq
  419. have eqs : options [3, 1, 2, 2] [4, 0, 0, 1] = [[3, 0, 0, 1], [1, 0, 0, 1], [4, 0, 0, 0]] := by decide
  420. rw [eqs] at hq
  421. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  422. rcases hq with rfl | rfl | rfl
  423. · exact s3122_3_0_0_1
  424. · exact s3122_1_0_0_1
  425. · exact s3122_4_0_0_0
  426. private theorem s3122_4_0_0_2 : Outcome [3, 1, 2, 2] [4, 0, 0, 2] true := Outcome.winning (q := [4, 0, 0, 1]) (by decide) s3122_4_0_0_1
  427. private theorem s3122_5_0_0_1 : Outcome [3, 1, 2, 2] [5, 0, 0, 1] true := Outcome.winning (q := [4, 0, 0, 1]) (by decide) s3122_4_0_0_1
  428. private theorem s3122_6_0_0_0 : Outcome [3, 1, 2, 2] [6, 0, 0, 0] true := Outcome.winning (q := [3, 0, 0, 0]) (by decide) s3122_3_0_0_0
  429. private theorem s3122_6_0_0_1 : Outcome [3, 1, 2, 2] [6, 0, 0, 1] false := by
  430. apply Outcome.losing (by decide)
  431. intro q hq
  432. have eqs : options [3, 1, 2, 2] [6, 0, 0, 1] = [[5, 0, 0, 1], [3, 0, 0, 1], [2, 0, 0, 1], [6, 0, 0, 0]] := by decide
  433. rw [eqs] at hq
  434. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  435. rcases hq with rfl | rfl | rfl | rfl
  436. · exact s3122_5_0_0_1
  437. · exact s3122_3_0_0_1
  438. · exact s3122_2_0_0_1
  439. · exact s3122_6_0_0_0
  440. private theorem s3122_7_0_0_1 : Outcome [3, 1, 2, 2] [7, 0, 0, 1] true := Outcome.winning (q := [6, 0, 0, 1]) (by decide) s3122_6_0_0_1
  441. private theorem s3122_7_0_0_0 : Outcome [3, 1, 2, 2] [7, 0, 0, 0] true := Outcome.winning (q := [3, 0, 0, 0]) (by decide) s3122_3_0_0_0
  442. private theorem s3122_7_0_0_2 : Outcome [3, 1, 2, 2] [7, 0, 0, 2] false := by
  443. apply Outcome.losing (by decide)
  444. intro q hq
  445. have eqs : options [3, 1, 2, 2] [7, 0, 0, 2] = [[6, 0, 0, 2], [4, 0, 0, 2], [3, 0, 0, 2], [7, 0, 0, 1], [7, 0, 0, 0]] := by decide
  446. rw [eqs] at hq
  447. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  448. rcases hq with rfl | rfl | rfl | rfl | rfl
  449. · exact s3122_6_0_0_2
  450. · exact s3122_4_0_0_2
  451. · exact s3122_3_0_0_2
  452. · exact s3122_7_0_0_1
  453. · exact s3122_7_0_0_0
  454. private theorem s3122_8_0_0_2 : Outcome [3, 1, 2, 2] [8, 0, 0, 2] true := Outcome.winning (q := [7, 0, 0, 2]) (by decide) s3122_7_0_0_2
  455. private theorem s3122_4_0_2_1 : Outcome [3, 1, 2, 2] [4, 0, 2, 1] true := Outcome.winning (q := [4, 0, 0, 1]) (by decide) s3122_4_0_0_1
  456. private theorem s3122_2_0_2_1 : Outcome [3, 1, 2, 2] [2, 0, 2, 1] true := Outcome.winning (q := [2, 0, 2, 0]) (by decide) s3122_2_0_2_0
  457. 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
  458. private theorem s3122_5_0_2_0 : Outcome [3, 1, 2, 2] [5, 0, 2, 0] true := Outcome.winning (q := [2, 0, 2, 0]) (by decide) s3122_2_0_2_0
  459. private theorem s3122_5_0_2_1 : Outcome [3, 1, 2, 2] [5, 0, 2, 1] false := by
  460. apply Outcome.losing (by decide)
  461. intro q hq
  462. have eqs : options [3, 1, 2, 2] [5, 0, 2, 1] = [[4, 0, 2, 1], [2, 0, 2, 1], [1, 0, 2, 1], [5, 0, 1, 1], [5, 0, 0, 1], [5, 0, 2, 0]] := by decide
  463. rw [eqs] at hq
  464. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  465. rcases hq with rfl | rfl | rfl | rfl | rfl | rfl
  466. · exact s3122_4_0_2_1
  467. · exact s3122_2_0_2_1
  468. · exact s3122_1_0_2_1
  469. · exact s3122_5_0_1_1
  470. · exact s3122_5_0_0_1
  471. · exact s3122_5_0_2_0
  472. private theorem s3122_8_0_2_1 : Outcome [3, 1, 2, 2] [8, 0, 2, 1] true := Outcome.winning (q := [5, 0, 2, 1]) (by decide) s3122_5_0_2_1
  473. private theorem s3122_6_0_2_0 : Outcome [3, 1, 2, 2] [6, 0, 2, 0] true := Outcome.winning (q := [2, 0, 2, 0]) (by decide) s3122_2_0_2_0
  474. private theorem s3122_4_0_2_0 : Outcome [3, 1, 2, 2] [4, 0, 2, 0] true := Outcome.winning (q := [4, 0, 1, 0]) (by decide) s3122_4_0_1_0
  475. private theorem s3122_6_0_1_0 : Outcome [3, 1, 2, 2] [6, 0, 1, 0] false := by
  476. apply Outcome.losing (by decide)
  477. intro q hq
  478. have eqs : options [3, 1, 2, 2] [6, 0, 1, 0] = [[5, 0, 1, 0], [3, 0, 1, 0], [2, 0, 1, 0], [6, 0, 0, 0]] := by decide
  479. rw [eqs] at hq
  480. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  481. rcases hq with rfl | rfl | rfl | rfl
  482. · exact s3122_5_0_1_0
  483. · exact s3122_3_0_1_0
  484. · exact s3122_2_0_1_0
  485. · exact s3122_6_0_0_0
  486. private theorem s3122_7_0_1_0 : Outcome [3, 1, 2, 2] [7, 0, 1, 0] true := Outcome.winning (q := [6, 0, 1, 0]) (by decide) s3122_6_0_1_0
  487. private theorem s3122_7_0_2_0 : Outcome [3, 1, 2, 2] [7, 0, 2, 0] false := by
  488. apply Outcome.losing (by decide)
  489. intro q hq
  490. have eqs : options [3, 1, 2, 2] [7, 0, 2, 0] = [[6, 0, 2, 0], [4, 0, 2, 0], [3, 0, 2, 0], [7, 0, 1, 0], [7, 0, 0, 0]] := by decide
  491. rw [eqs] at hq
  492. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  493. rcases hq with rfl | rfl | rfl | rfl | rfl
  494. · exact s3122_6_0_2_0
  495. · exact s3122_4_0_2_0
  496. · exact s3122_3_0_2_0
  497. · exact s3122_7_0_1_0
  498. · exact s3122_7_0_0_0
  499. private theorem s3122_8_0_2_0 : Outcome [3, 1, 2, 2] [8, 0, 2, 0] true := Outcome.winning (q := [7, 0, 2, 0]) (by decide) s3122_7_0_2_0
  500. private theorem s3122_8_0_2_2 : Outcome [3, 1, 2, 2] [8, 0, 2, 2] false := by
  501. apply Outcome.losing (by decide)
  502. intro q hq
  503. have eqs : options [3, 1, 2, 2] [8, 0, 2, 2] = [[7, 0, 2, 2], [5, 0, 2, 2], [4, 0, 2, 2], [8, 0, 1, 2], [8, 0, 0, 2], [8, 0, 2, 1], [8, 0, 2, 0]] := by decide
  504. rw [eqs] at hq
  505. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  506. rcases hq with rfl | rfl | rfl | rfl | rfl | rfl | rfl
  507. · exact s3122_7_0_2_2
  508. · exact s3122_5_0_2_2
  509. · exact s3122_4_0_2_2
  510. · exact s3122_8_0_1_2
  511. · exact s3122_8_0_0_2
  512. · exact s3122_8_0_2_1
  513. · exact s3122_8_0_2_0
  514. private theorem s3122_8_1_2_2 : Outcome [3, 1, 2, 2] [8, 1, 2, 2] true := Outcome.winning (q := [8, 0, 2, 2]) (by decide) s3122_8_0_2_2
  515. private theorem s3123_0_0_0_0 : Outcome [3, 1, 2, 3] [0, 0, 0, 0] true := Outcome.terminal (by decide)
  516. private theorem s3123_0_0_1_0 : Outcome [3, 1, 2, 3] [0, 0, 1, 0] false := by
  517. apply Outcome.losing (by decide)
  518. intro q hq
  519. have eqs : options [3, 1, 2, 3] [0, 0, 1, 0] = [[0, 0, 0, 0]] := by decide
  520. rw [eqs] at hq
  521. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  522. subst q
  523. exact s3123_0_0_0_0
  524. private theorem s3123_0_0_1_2 : Outcome [3, 1, 2, 3] [0, 0, 1, 2] true := Outcome.winning (q := [0, 0, 1, 0]) (by decide) s3123_0_0_1_0
  525. private theorem s3123_0_0_0_1 : Outcome [3, 1, 2, 3] [0, 0, 0, 1] false := by
  526. apply Outcome.losing (by decide)
  527. intro q hq
  528. have eqs : options [3, 1, 2, 3] [0, 0, 0, 1] = [[0, 0, 0, 0]] := by decide
  529. rw [eqs] at hq
  530. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  531. subst q
  532. exact s3123_0_0_0_0
  533. private theorem s3123_0_0_0_2 : Outcome [3, 1, 2, 3] [0, 0, 0, 2] true := Outcome.winning (q := [0, 0, 0, 1]) (by decide) s3123_0_0_0_1
  534. private theorem s3123_0_0_2_1 : Outcome [3, 1, 2, 3] [0, 0, 2, 1] true := Outcome.winning (q := [0, 0, 0, 1]) (by decide) s3123_0_0_0_1
  535. private theorem s3123_0_0_2_0 : Outcome [3, 1, 2, 3] [0, 0, 2, 0] true := Outcome.winning (q := [0, 0, 1, 0]) (by decide) s3123_0_0_1_0
  536. private theorem s3123_0_0_2_2 : Outcome [3, 1, 2, 3] [0, 0, 2, 2] false := by
  537. apply Outcome.losing (by decide)
  538. intro q hq
  539. have eqs : options [3, 1, 2, 3] [0, 0, 2, 2] = [[0, 0, 1, 2], [0, 0, 0, 2], [0, 0, 2, 1], [0, 0, 2, 0]] := by decide
  540. rw [eqs] at hq
  541. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  542. rcases hq with rfl | rfl | rfl | rfl
  543. · exact s3123_0_0_1_2
  544. · exact s3123_0_0_0_2
  545. · exact s3123_0_0_2_1
  546. · exact s3123_0_0_2_0
  547. private theorem s3123_0_1_2_2 : Outcome [3, 1, 2, 3] [0, 1, 2, 2] true := Outcome.winning (q := [0, 0, 2, 2]) (by decide) s3123_0_0_2_2
  548. private theorem s3123_1_0_2_2 : Outcome [3, 1, 2, 3] [1, 0, 2, 2] true := Outcome.winning (q := [0, 0, 2, 2]) (by decide) s3123_0_0_2_2
  549. private theorem s3123_0_1_1_0 : Outcome [3, 1, 2, 3] [0, 1, 1, 0] true := Outcome.winning (q := [0, 0, 1, 0]) (by decide) s3123_0_0_1_0
  550. private theorem s3123_1_0_1_0 : Outcome [3, 1, 2, 3] [1, 0, 1, 0] true := Outcome.winning (q := [0, 0, 1, 0]) (by decide) s3123_0_0_1_0
  551. private theorem s3123_0_1_0_0 : Outcome [3, 1, 2, 3] [0, 1, 0, 0] false := by
  552. apply Outcome.losing (by decide)
  553. intro q hq
  554. have eqs : options [3, 1, 2, 3] [0, 1, 0, 0] = [[0, 0, 0, 0]] := by decide
  555. rw [eqs] at hq
  556. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  557. subst q
  558. exact s3123_0_0_0_0
  559. private theorem s3123_1_1_0_0 : Outcome [3, 1, 2, 3] [1, 1, 0, 0] true := Outcome.winning (q := [0, 1, 0, 0]) (by decide) s3123_0_1_0_0
  560. private theorem s3123_1_1_1_0 : Outcome [3, 1, 2, 3] [1, 1, 1, 0] false := by
  561. apply Outcome.losing (by decide)
  562. intro q hq
  563. have eqs : options [3, 1, 2, 3] [1, 1, 1, 0] = [[0, 1, 1, 0], [1, 0, 1, 0], [1, 1, 0, 0]] := by decide
  564. rw [eqs] at hq
  565. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  566. rcases hq with rfl | rfl | rfl
  567. · exact s3123_0_1_1_0
  568. · exact s3123_1_0_1_0
  569. · exact s3123_1_1_0_0
  570. private theorem s3123_1_1_1_2 : Outcome [3, 1, 2, 3] [1, 1, 1, 2] true := Outcome.winning (q := [1, 1, 1, 0]) (by decide) s3123_1_1_1_0
  571. private theorem s3123_0_1_0_1 : Outcome [3, 1, 2, 3] [0, 1, 0, 1] true := Outcome.winning (q := [0, 0, 0, 1]) (by decide) s3123_0_0_0_1
  572. private theorem s3123_1_0_0_1 : Outcome [3, 1, 2, 3] [1, 0, 0, 1] true := Outcome.winning (q := [0, 0, 0, 1]) (by decide) s3123_0_0_0_1
  573. private theorem s3123_1_1_0_1 : Outcome [3, 1, 2, 3] [1, 1, 0, 1] false := by
  574. apply Outcome.losing (by decide)
  575. intro q hq
  576. have eqs : options [3, 1, 2, 3] [1, 1, 0, 1] = [[0, 1, 0, 1], [1, 0, 0, 1], [1, 1, 0, 0]] := by decide
  577. rw [eqs] at hq
  578. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  579. rcases hq with rfl | rfl | rfl
  580. · exact s3123_0_1_0_1
  581. · exact s3123_1_0_0_1
  582. · exact s3123_1_1_0_0
  583. private theorem s3123_1_1_0_2 : Outcome [3, 1, 2, 3] [1, 1, 0, 2] true := Outcome.winning (q := [1, 1, 0, 1]) (by decide) s3123_1_1_0_1
  584. private theorem s3123_1_1_2_1 : Outcome [3, 1, 2, 3] [1, 1, 2, 1] true := Outcome.winning (q := [1, 1, 0, 1]) (by decide) s3123_1_1_0_1
  585. private theorem s3123_1_1_2_0 : Outcome [3, 1, 2, 3] [1, 1, 2, 0] true := Outcome.winning (q := [1, 1, 1, 0]) (by decide) s3123_1_1_1_0
  586. private theorem s3123_1_1_2_2 : Outcome [3, 1, 2, 3] [1, 1, 2, 2] false := by
  587. apply Outcome.losing (by decide)
  588. intro q hq
  589. have eqs : options [3, 1, 2, 3] [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
  590. rw [eqs] at hq
  591. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  592. rcases hq with rfl | rfl | rfl | rfl | rfl | rfl
  593. · exact s3123_0_1_2_2
  594. · exact s3123_1_0_2_2
  595. · exact s3123_1_1_1_2
  596. · exact s3123_1_1_0_2
  597. · exact s3123_1_1_2_1
  598. · exact s3123_1_1_2_0
  599. private theorem s3123_4_1_0_0 : Outcome [3, 1, 2, 3] [4, 1, 0, 0] true := Outcome.winning (q := [0, 1, 0, 0]) (by decide) s3123_0_1_0_0
  600. private theorem s3123_2_1_0_0 : Outcome [3, 1, 2, 3] [2, 1, 0, 0] true := Outcome.winning (q := [0, 1, 0, 0]) (by decide) s3123_0_1_0_0
  601. private theorem s3123_1_0_0_0 : Outcome [3, 1, 2, 3] [1, 0, 0, 0] false := by
  602. apply Outcome.losing (by decide)
  603. intro q hq
  604. have eqs : options [3, 1, 2, 3] [1, 0, 0, 0] = [[0, 0, 0, 0]] := by decide
  605. rw [eqs] at hq
  606. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  607. subst q
  608. exact s3123_0_0_0_0
  609. private theorem s3123_5_0_0_0 : Outcome [3, 1, 2, 3] [5, 0, 0, 0] true := Outcome.winning (q := [1, 0, 0, 0]) (by decide) s3123_1_0_0_0
  610. private theorem s3123_5_1_0_0 : Outcome [3, 1, 2, 3] [5, 1, 0, 0] false := by
  611. apply Outcome.losing (by decide)
  612. intro q hq
  613. have eqs : options [3, 1, 2, 3] [5, 1, 0, 0] = [[4, 1, 0, 0], [2, 1, 0, 0], [1, 1, 0, 0], [5, 0, 0, 0]] := by decide
  614. rw [eqs] at hq
  615. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  616. rcases hq with rfl | rfl | rfl | rfl
  617. · exact s3123_4_1_0_0
  618. · exact s3123_2_1_0_0
  619. · exact s3123_1_1_0_0
  620. · exact s3123_5_0_0_0
  621. private theorem s3123_5_1_0_2 : Outcome [3, 1, 2, 3] [5, 1, 0, 2] true := Outcome.winning (q := [5, 1, 0, 0]) (by decide) s3123_5_1_0_0
  622. private theorem s3123_2_1_0_1 : Outcome [3, 1, 2, 3] [2, 1, 0, 1] true := Outcome.winning (q := [1, 1, 0, 1]) (by decide) s3123_1_1_0_1
  623. private theorem s3123_2_0_0_0 : Outcome [3, 1, 2, 3] [2, 0, 0, 0] true := Outcome.winning (q := [1, 0, 0, 0]) (by decide) s3123_1_0_0_0
  624. private theorem s3123_3_0_0_0 : Outcome [3, 1, 2, 3] [3, 0, 0, 0] false := by
  625. apply Outcome.losing (by decide)
  626. intro q hq
  627. have eqs : options [3, 1, 2, 3] [3, 0, 0, 0] = [[2, 0, 0, 0]] := by decide
  628. rw [eqs] at hq
  629. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  630. subst q
  631. exact s3123_2_0_0_0
  632. private theorem s3123_3_0_0_1 : Outcome [3, 1, 2, 3] [3, 0, 0, 1] true := Outcome.winning (q := [3, 0, 0, 0]) (by decide) s3123_3_0_0_0
  633. private theorem s3123_3_1_0_0 : Outcome [3, 1, 2, 3] [3, 1, 0, 0] true := Outcome.winning (q := [3, 0, 0, 0]) (by decide) s3123_3_0_0_0
  634. private theorem s3123_3_1_0_1 : Outcome [3, 1, 2, 3] [3, 1, 0, 1] false := by
  635. apply Outcome.losing (by decide)
  636. intro q hq
  637. have eqs : options [3, 1, 2, 3] [3, 1, 0, 1] = [[2, 1, 0, 1], [3, 0, 0, 1], [3, 1, 0, 0]] := by decide
  638. rw [eqs] at hq
  639. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  640. rcases hq with rfl | rfl | rfl
  641. · exact s3123_2_1_0_1
  642. · exact s3123_3_0_0_1
  643. · exact s3123_3_1_0_0
  644. private theorem s3123_3_1_0_2 : Outcome [3, 1, 2, 3] [3, 1, 0, 2] true := Outcome.winning (q := [3, 1, 0, 1]) (by decide) s3123_3_1_0_1
  645. private theorem s3123_1_0_0_2 : Outcome [3, 1, 2, 3] [1, 0, 0, 2] true := Outcome.winning (q := [1, 0, 0, 0]) (by decide) s3123_1_0_0_0
  646. private theorem s3123_2_0_0_1 : Outcome [3, 1, 2, 3] [2, 0, 0, 1] true := Outcome.winning (q := [0, 0, 0, 1]) (by decide) s3123_0_0_0_1
  647. private theorem s3123_2_0_0_2 : Outcome [3, 1, 2, 3] [2, 0, 0, 2] false := by
  648. apply Outcome.losing (by decide)
  649. intro q hq
  650. have eqs : options [3, 1, 2, 3] [2, 0, 0, 2] = [[1, 0, 0, 2], [0, 0, 0, 2], [2, 0, 0, 1], [2, 0, 0, 0]] := by decide
  651. rw [eqs] at hq
  652. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  653. rcases hq with rfl | rfl | rfl | rfl
  654. · exact s3123_1_0_0_2
  655. · exact s3123_0_0_0_2
  656. · exact s3123_2_0_0_1
  657. · exact s3123_2_0_0_0
  658. private theorem s3123_2_1_0_2 : Outcome [3, 1, 2, 3] [2, 1, 0, 2] true := Outcome.winning (q := [2, 0, 0, 2]) (by decide) s3123_2_0_0_2
  659. private theorem s3123_6_0_0_2 : Outcome [3, 1, 2, 3] [6, 0, 0, 2] true := Outcome.winning (q := [2, 0, 0, 2]) (by decide) s3123_2_0_0_2
  660. private theorem s3123_6_1_0_1 : Outcome [3, 1, 2, 3] [6, 1, 0, 1] true := Outcome.winning (q := [3, 1, 0, 1]) (by decide) s3123_3_1_0_1
  661. private theorem s3123_6_1_0_0 : Outcome [3, 1, 2, 3] [6, 1, 0, 0] true := Outcome.winning (q := [5, 1, 0, 0]) (by decide) s3123_5_1_0_0
  662. private theorem s3123_6_1_0_2 : Outcome [3, 1, 2, 3] [6, 1, 0, 2] false := by
  663. apply Outcome.losing (by decide)
  664. intro q hq
  665. have eqs : options [3, 1, 2, 3] [6, 1, 0, 2] = [[5, 1, 0, 2], [3, 1, 0, 2], [2, 1, 0, 2], [6, 0, 0, 2], [6, 1, 0, 1], [6, 1, 0, 0]] := by decide
  666. rw [eqs] at hq
  667. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  668. rcases hq with rfl | rfl | rfl | rfl | rfl | rfl
  669. · exact s3123_5_1_0_2
  670. · exact s3123_3_1_0_2
  671. · exact s3123_2_1_0_2
  672. · exact s3123_6_0_0_2
  673. · exact s3123_6_1_0_1
  674. · exact s3123_6_1_0_0
  675. private theorem s3123_6_1_2_2 : Outcome [3, 1, 2, 3] [6, 1, 2, 2] true := Outcome.winning (q := [6, 1, 0, 2]) (by decide) s3123_6_1_0_2
  676. private theorem s3123_4_1_2_2 : Outcome [3, 1, 2, 3] [4, 1, 2, 2] true := Outcome.winning (q := [1, 1, 2, 2]) (by decide) s3123_1_1_2_2
  677. private theorem s3123_2_0_2_2 : Outcome [3, 1, 2, 3] [2, 0, 2, 2] true := Outcome.winning (q := [0, 0, 2, 2]) (by decide) s3123_0_0_2_2
  678. private theorem s3123_0_0_1_1 : Outcome [3, 1, 2, 3] [0, 0, 1, 1] true := Outcome.winning (q := [0, 0, 0, 1]) (by decide) s3123_0_0_0_1
  679. private theorem s3123_1_0_1_1 : Outcome [3, 1, 2, 3] [1, 0, 1, 1] false := by
  680. apply Outcome.losing (by decide)
  681. intro q hq
  682. have eqs : options [3, 1, 2, 3] [1, 0, 1, 1] = [[0, 0, 1, 1], [1, 0, 0, 1], [1, 0, 1, 0]] := by decide
  683. rw [eqs] at hq
  684. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  685. rcases hq with rfl | rfl | rfl
  686. · exact s3123_0_0_1_1
  687. · exact s3123_1_0_0_1
  688. · exact s3123_1_0_1_0
  689. private theorem s3123_2_0_1_1 : Outcome [3, 1, 2, 3] [2, 0, 1, 1] true := Outcome.winning (q := [1, 0, 1, 1]) (by decide) s3123_1_0_1_1
  690. private theorem s3123_3_0_1_0 : Outcome [3, 1, 2, 3] [3, 0, 1, 0] true := Outcome.winning (q := [3, 0, 0, 0]) (by decide) s3123_3_0_0_0
  691. private theorem s3123_3_0_1_1 : Outcome [3, 1, 2, 3] [3, 0, 1, 1] false := by
  692. apply Outcome.losing (by decide)
  693. intro q hq
  694. have eqs : options [3, 1, 2, 3] [3, 0, 1, 1] = [[2, 0, 1, 1], [3, 0, 0, 1], [3, 0, 1, 0]] := by decide
  695. rw [eqs] at hq
  696. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  697. rcases hq with rfl | rfl | rfl
  698. · exact s3123_2_0_1_1
  699. · exact s3123_3_0_0_1
  700. · exact s3123_3_0_1_0
  701. private theorem s3123_3_0_1_2 : Outcome [3, 1, 2, 3] [3, 0, 1, 2] true := Outcome.winning (q := [3, 0, 1, 1]) (by decide) s3123_3_0_1_1
  702. private theorem s3123_3_0_0_2 : Outcome [3, 1, 2, 3] [3, 0, 0, 2] true := Outcome.winning (q := [2, 0, 0, 2]) (by decide) s3123_2_0_0_2
  703. private theorem s3123_3_0_2_1 : Outcome [3, 1, 2, 3] [3, 0, 2, 1] true := Outcome.winning (q := [3, 0, 1, 1]) (by decide) s3123_3_0_1_1
  704. private theorem s3123_1_0_2_0 : Outcome [3, 1, 2, 3] [1, 0, 2, 0] true := Outcome.winning (q := [1, 0, 0, 0]) (by decide) s3123_1_0_0_0
  705. private theorem s3123_2_0_1_0 : Outcome [3, 1, 2, 3] [2, 0, 1, 0] true := Outcome.winning (q := [0, 0, 1, 0]) (by decide) s3123_0_0_1_0
  706. private theorem s3123_2_0_2_0 : Outcome [3, 1, 2, 3] [2, 0, 2, 0] false := by
  707. apply Outcome.losing (by decide)
  708. intro q hq
  709. have eqs : options [3, 1, 2, 3] [2, 0, 2, 0] = [[1, 0, 2, 0], [0, 0, 2, 0], [2, 0, 1, 0], [2, 0, 0, 0]] := by decide
  710. rw [eqs] at hq
  711. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  712. rcases hq with rfl | rfl | rfl | rfl
  713. · exact s3123_1_0_2_0
  714. · exact s3123_0_0_2_0
  715. · exact s3123_2_0_1_0
  716. · exact s3123_2_0_0_0
  717. private theorem s3123_3_0_2_0 : Outcome [3, 1, 2, 3] [3, 0, 2, 0] true := Outcome.winning (q := [2, 0, 2, 0]) (by decide) s3123_2_0_2_0
  718. private theorem s3123_3_0_2_2 : Outcome [3, 1, 2, 3] [3, 0, 2, 2] false := by
  719. apply Outcome.losing (by decide)
  720. intro q hq
  721. have eqs : options [3, 1, 2, 3] [3, 0, 2, 2] = [[2, 0, 2, 2], [3, 0, 1, 2], [3, 0, 0, 2], [3, 0, 2, 1], [3, 0, 2, 0]] := by decide
  722. rw [eqs] at hq
  723. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  724. rcases hq with rfl | rfl | rfl | rfl | rfl
  725. · exact s3123_2_0_2_2
  726. · exact s3123_3_0_1_2
  727. · exact s3123_3_0_0_2
  728. · exact s3123_3_0_2_1
  729. · exact s3123_3_0_2_0
  730. private theorem s3123_3_1_2_2 : Outcome [3, 1, 2, 3] [3, 1, 2, 2] true := Outcome.winning (q := [3, 0, 2, 2]) (by decide) s3123_3_0_2_2
  731. private theorem s3123_7_0_2_2 : Outcome [3, 1, 2, 3] [7, 0, 2, 2] true := Outcome.winning (q := [3, 0, 2, 2]) (by decide) s3123_3_0_2_2
  732. private theorem s3123_0_1_1_1 : Outcome [3, 1, 2, 3] [0, 1, 1, 1] false := by
  733. apply Outcome.losing (by decide)
  734. intro q hq
  735. have eqs : options [3, 1, 2, 3] [0, 1, 1, 1] = [[0, 0, 1, 1], [0, 1, 0, 1], [0, 1, 1, 0]] := by decide
  736. rw [eqs] at hq
  737. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  738. rcases hq with rfl | rfl | rfl
  739. · exact s3123_0_0_1_1
  740. · exact s3123_0_1_0_1
  741. · exact s3123_0_1_1_0
  742. private theorem s3123_0_1_1_2 : Outcome [3, 1, 2, 3] [0, 1, 1, 2] true := Outcome.winning (q := [0, 1, 1, 1]) (by decide) s3123_0_1_1_1
  743. private theorem s3123_2_0_1_2 : Outcome [3, 1, 2, 3] [2, 0, 1, 2] true := Outcome.winning (q := [2, 0, 0, 2]) (by decide) s3123_2_0_0_2
  744. private theorem s3123_2_1_1_1 : Outcome [3, 1, 2, 3] [2, 1, 1, 1] true := Outcome.winning (q := [0, 1, 1, 1]) (by decide) s3123_0_1_1_1
  745. private theorem s3123_2_1_1_0 : Outcome [3, 1, 2, 3] [2, 1, 1, 0] true := Outcome.winning (q := [1, 1, 1, 0]) (by decide) s3123_1_1_1_0
  746. private theorem s3123_2_1_1_2 : Outcome [3, 1, 2, 3] [2, 1, 1, 2] false := by
  747. apply Outcome.losing (by decide)
  748. intro q hq
  749. have eqs : options [3, 1, 2, 3] [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
  750. rw [eqs] at hq
  751. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  752. rcases hq with rfl | rfl | rfl | rfl | rfl | rfl
  753. · exact s3123_1_1_1_2
  754. · exact s3123_0_1_1_2
  755. · exact s3123_2_0_1_2
  756. · exact s3123_2_1_0_2
  757. · exact s3123_2_1_1_1
  758. · exact s3123_2_1_1_0
  759. private theorem s3123_3_1_1_2 : Outcome [3, 1, 2, 3] [3, 1, 1, 2] true := Outcome.winning (q := [2, 1, 1, 2]) (by decide) s3123_2_1_1_2
  760. private theorem s3123_4_0_0_1 : Outcome [3, 1, 2, 3] [4, 0, 0, 1] true := Outcome.winning (q := [0, 0, 0, 1]) (by decide) s3123_0_0_0_1
  761. private theorem s3123_4_0_0_0 : Outcome [3, 1, 2, 3] [4, 0, 0, 0] true := Outcome.winning (q := [3, 0, 0, 0]) (by decide) s3123_3_0_0_0
  762. private theorem s3123_4_0_0_2 : Outcome [3, 1, 2, 3] [4, 0, 0, 2] false := by
  763. apply Outcome.losing (by decide)
  764. intro q hq
  765. have eqs : options [3, 1, 2, 3] [4, 0, 0, 2] = [[3, 0, 0, 2], [1, 0, 0, 2], [0, 0, 0, 2], [4, 0, 0, 1], [4, 0, 0, 0]] := by decide
  766. rw [eqs] at hq
  767. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  768. rcases hq with rfl | rfl | rfl | rfl | rfl
  769. · exact s3123_3_0_0_2
  770. · exact s3123_1_0_0_2
  771. · exact s3123_0_0_0_2
  772. · exact s3123_4_0_0_1
  773. · exact s3123_4_0_0_0
  774. private theorem s3123_4_0_1_2 : Outcome [3, 1, 2, 3] [4, 0, 1, 2] true := Outcome.winning (q := [4, 0, 0, 2]) (by decide) s3123_4_0_0_2
  775. private theorem s3123_4_1_0_2 : Outcome [3, 1, 2, 3] [4, 1, 0, 2] true := Outcome.winning (q := [4, 0, 0, 2]) (by decide) s3123_4_0_0_2
  776. private theorem s3123_4_1_1_1 : Outcome [3, 1, 2, 3] [4, 1, 1, 1] true := Outcome.winning (q := [0, 1, 1, 1]) (by decide) s3123_0_1_1_1
  777. private theorem s3123_3_1_1_0 : Outcome [3, 1, 2, 3] [3, 1, 1, 0] false := by
  778. apply Outcome.losing (by decide)
  779. intro q hq
  780. have eqs : options [3, 1, 2, 3] [3, 1, 1, 0] = [[2, 1, 1, 0], [3, 0, 1, 0], [3, 1, 0, 0]] := by decide
  781. rw [eqs] at hq
  782. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  783. rcases hq with rfl | rfl | rfl
  784. · exact s3123_2_1_1_0
  785. · exact s3123_3_0_1_0
  786. · exact s3123_3_1_0_0
  787. private theorem s3123_4_1_1_0 : Outcome [3, 1, 2, 3] [4, 1, 1, 0] true := Outcome.winning (q := [3, 1, 1, 0]) (by decide) s3123_3_1_1_0
  788. private theorem s3123_4_1_1_2 : Outcome [3, 1, 2, 3] [4, 1, 1, 2] false := by
  789. apply Outcome.losing (by decide)
  790. intro q hq
  791. have eqs : options [3, 1, 2, 3] [4, 1, 1, 2] = [[3, 1, 1, 2], [1, 1, 1, 2], [0, 1, 1, 2], [4, 0, 1, 2], [4, 1, 0, 2], [4, 1, 1, 1], [4, 1, 1, 0]] := by decide
  792. rw [eqs] at hq
  793. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  794. rcases hq with rfl | rfl | rfl | rfl | rfl | rfl | rfl
  795. · exact s3123_3_1_1_2
  796. · exact s3123_1_1_1_2
  797. · exact s3123_0_1_1_2
  798. · exact s3123_4_0_1_2
  799. · exact s3123_4_1_0_2
  800. · exact s3123_4_1_1_1
  801. · exact s3123_4_1_1_0
  802. private theorem s3123_7_1_1_2 : Outcome [3, 1, 2, 3] [7, 1, 1, 2] true := Outcome.winning (q := [4, 1, 1, 2]) (by decide) s3123_4_1_1_2
  803. private theorem s3123_7_1_0_2 : Outcome [3, 1, 2, 3] [7, 1, 0, 2] true := Outcome.winning (q := [6, 1, 0, 2]) (by decide) s3123_6_1_0_2
  804. private theorem s3123_0_1_2_1 : Outcome [3, 1, 2, 3] [0, 1, 2, 1] true := Outcome.winning (q := [0, 1, 1, 1]) (by decide) s3123_0_1_1_1
  805. private theorem s3123_2_0_2_1 : Outcome [3, 1, 2, 3] [2, 0, 2, 1] true := Outcome.winning (q := [2, 0, 2, 0]) (by decide) s3123_2_0_2_0
  806. private theorem s3123_2_1_2_0 : Outcome [3, 1, 2, 3] [2, 1, 2, 0] true := Outcome.winning (q := [2, 0, 2, 0]) (by decide) s3123_2_0_2_0
  807. private theorem s3123_2_1_2_1 : Outcome [3, 1, 2, 3] [2, 1, 2, 1] false := by
  808. apply Outcome.losing (by decide)
  809. intro q hq
  810. have eqs : options [3, 1, 2, 3] [2, 1, 2, 1] = [[1, 1, 2, 1], [0, 1, 2, 1], [2, 0, 2, 1], [2, 1, 1, 1], [2, 1, 0, 1], [2, 1, 2, 0]] := by decide
  811. rw [eqs] at hq
  812. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  813. rcases hq with rfl | rfl | rfl | rfl | rfl | rfl
  814. · exact s3123_1_1_2_1
  815. · exact s3123_0_1_2_1
  816. · exact s3123_2_0_2_1
  817. · exact s3123_2_1_1_1
  818. · exact s3123_2_1_0_1
  819. · exact s3123_2_1_2_0
  820. private theorem s3123_3_1_2_1 : Outcome [3, 1, 2, 3] [3, 1, 2, 1] true := Outcome.winning (q := [2, 1, 2, 1]) (by decide) s3123_2_1_2_1
  821. private theorem s3123_4_0_1_0 : Outcome [3, 1, 2, 3] [4, 0, 1, 0] true := Outcome.winning (q := [0, 0, 1, 0]) (by decide) s3123_0_0_1_0
  822. private theorem s3123_4_0_2_0 : Outcome [3, 1, 2, 3] [4, 0, 2, 0] false := by
  823. apply Outcome.losing (by decide)
  824. intro q hq
  825. have eqs : options [3, 1, 2, 3] [4, 0, 2, 0] = [[3, 0, 2, 0], [1, 0, 2, 0], [0, 0, 2, 0], [4, 0, 1, 0], [4, 0, 0, 0]] := by decide
  826. rw [eqs] at hq
  827. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  828. rcases hq with rfl | rfl | rfl | rfl | rfl
  829. · exact s3123_3_0_2_0
  830. · exact s3123_1_0_2_0
  831. · exact s3123_0_0_2_0
  832. · exact s3123_4_0_1_0
  833. · exact s3123_4_0_0_0
  834. private theorem s3123_4_0_2_1 : Outcome [3, 1, 2, 3] [4, 0, 2, 1] true := Outcome.winning (q := [4, 0, 2, 0]) (by decide) s3123_4_0_2_0
  835. private theorem s3123_4_1_0_1 : Outcome [3, 1, 2, 3] [4, 1, 0, 1] true := Outcome.winning (q := [3, 1, 0, 1]) (by decide) s3123_3_1_0_1
  836. private theorem s3123_4_1_2_0 : Outcome [3, 1, 2, 3] [4, 1, 2, 0] true := Outcome.winning (q := [4, 0, 2, 0]) (by decide) s3123_4_0_2_0
  837. private theorem s3123_4_1_2_1 : Outcome [3, 1, 2, 3] [4, 1, 2, 1] false := by
  838. apply Outcome.losing (by decide)
  839. intro q hq
  840. have eqs : options [3, 1, 2, 3] [4, 1, 2, 1] = [[3, 1, 2, 1], [1, 1, 2, 1], [0, 1, 2, 1], [4, 0, 2, 1], [4, 1, 1, 1], [4, 1, 0, 1], [4, 1, 2, 0]] := by decide
  841. rw [eqs] at hq
  842. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  843. rcases hq with rfl | rfl | rfl | rfl | rfl | rfl | rfl
  844. · exact s3123_3_1_2_1
  845. · exact s3123_1_1_2_1
  846. · exact s3123_0_1_2_1
  847. · exact s3123_4_0_2_1
  848. · exact s3123_4_1_1_1
  849. · exact s3123_4_1_0_1
  850. · exact s3123_4_1_2_0
  851. private theorem s3123_7_1_2_1 : Outcome [3, 1, 2, 3] [7, 1, 2, 1] true := Outcome.winning (q := [4, 1, 2, 1]) (by decide) s3123_4_1_2_1
  852. private theorem s3123_5_1_2_0 : Outcome [3, 1, 2, 3] [5, 1, 2, 0] true := Outcome.winning (q := [5, 1, 0, 0]) (by decide) s3123_5_1_0_0
  853. private theorem s3123_3_1_2_0 : Outcome [3, 1, 2, 3] [3, 1, 2, 0] true := Outcome.winning (q := [3, 1, 1, 0]) (by decide) s3123_3_1_1_0
  854. private theorem s3123_6_0_2_0 : Outcome [3, 1, 2, 3] [6, 0, 2, 0] true := Outcome.winning (q := [2, 0, 2, 0]) (by decide) s3123_2_0_2_0
  855. private theorem s3123_6_1_1_0 : Outcome [3, 1, 2, 3] [6, 1, 1, 0] true := Outcome.winning (q := [3, 1, 1, 0]) (by decide) s3123_3_1_1_0
  856. private theorem s3123_6_1_2_0 : Outcome [3, 1, 2, 3] [6, 1, 2, 0] false := by
  857. apply Outcome.losing (by decide)
  858. intro q hq
  859. have eqs : options [3, 1, 2, 3] [6, 1, 2, 0] = [[5, 1, 2, 0], [3, 1, 2, 0], [2, 1, 2, 0], [6, 0, 2, 0], [6, 1, 1, 0], [6, 1, 0, 0]] := by decide
  860. rw [eqs] at hq
  861. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  862. rcases hq with rfl | rfl | rfl | rfl | rfl | rfl
  863. · exact s3123_5_1_2_0
  864. · exact s3123_3_1_2_0
  865. · exact s3123_2_1_2_0
  866. · exact s3123_6_0_2_0
  867. · exact s3123_6_1_1_0
  868. · exact s3123_6_1_0_0
  869. private theorem s3123_7_1_2_0 : Outcome [3, 1, 2, 3] [7, 1, 2, 0] true := Outcome.winning (q := [6, 1, 2, 0]) (by decide) s3123_6_1_2_0
  870. private theorem s3123_7_1_2_2 : Outcome [3, 1, 2, 3] [7, 1, 2, 2] false := by
  871. apply Outcome.losing (by decide)
  872. intro q hq
  873. have eqs : options [3, 1, 2, 3] [7, 1, 2, 2] = [[6, 1, 2, 2], [4, 1, 2, 2], [3, 1, 2, 2], [7, 0, 2, 2], [7, 1, 1, 2], [7, 1, 0, 2], [7, 1, 2, 1], [7, 1, 2, 0]] := by decide
  874. rw [eqs] at hq
  875. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  876. rcases hq with rfl | rfl | rfl | rfl | rfl | rfl | rfl | rfl
  877. · exact s3123_6_1_2_2
  878. · exact s3123_4_1_2_2
  879. · exact s3123_3_1_2_2
  880. · exact s3123_7_0_2_2
  881. · exact s3123_7_1_1_2
  882. · exact s3123_7_1_0_2
  883. · exact s3123_7_1_2_1
  884. · exact s3123_7_1_2_0
  885. private theorem s3123_8_1_2_2 : Outcome [3, 1, 2, 3] [8, 1, 2, 2] true := Outcome.winning (q := [7, 1, 2, 2]) (by decide) s3123_7_1_2_2
  886. private theorem s3312_0_0_0_0 : Outcome [3, 3, 1, 2] [0, 0, 0, 0] true := Outcome.terminal (by decide)
  887. private theorem s3312_0_0_0_1 : Outcome [3, 3, 1, 2] [0, 0, 0, 1] false := by
  888. apply Outcome.losing (by decide)
  889. intro q hq
  890. have eqs : options [3, 3, 1, 2] [0, 0, 0, 1] = [[0, 0, 0, 0]] := by decide
  891. rw [eqs] at hq
  892. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  893. subst q
  894. exact s3312_0_0_0_0
  895. private theorem s3312_0_0_1_1 : Outcome [3, 3, 1, 2] [0, 0, 1, 1] true := Outcome.winning (q := [0, 0, 0, 1]) (by decide) s3312_0_0_0_1
  896. private theorem s3312_0_1_0_1 : Outcome [3, 3, 1, 2] [0, 1, 0, 1] true := Outcome.winning (q := [0, 0, 0, 1]) (by decide) s3312_0_0_0_1
  897. private theorem s3312_0_0_1_0 : Outcome [3, 3, 1, 2] [0, 0, 1, 0] false := by
  898. apply Outcome.losing (by decide)
  899. intro q hq
  900. have eqs : options [3, 3, 1, 2] [0, 0, 1, 0] = [[0, 0, 0, 0]] := by decide
  901. rw [eqs] at hq
  902. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  903. subst q
  904. exact s3312_0_0_0_0
  905. private theorem s3312_0_1_1_0 : Outcome [3, 3, 1, 2] [0, 1, 1, 0] true := Outcome.winning (q := [0, 0, 1, 0]) (by decide) s3312_0_0_1_0
  906. private theorem s3312_0_1_1_1 : Outcome [3, 3, 1, 2] [0, 1, 1, 1] false := by
  907. apply Outcome.losing (by decide)
  908. intro q hq
  909. have eqs : options [3, 3, 1, 2] [0, 1, 1, 1] = [[0, 0, 1, 1], [0, 1, 0, 1], [0, 1, 1, 0]] := by decide
  910. rw [eqs] at hq
  911. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  912. rcases hq with rfl | rfl | rfl
  913. · exact s3312_0_0_1_1
  914. · exact s3312_0_1_0_1
  915. · exact s3312_0_1_1_0
  916. private theorem s3312_2_1_1_1 : Outcome [3, 3, 1, 2] [2, 1, 1, 1] true := Outcome.winning (q := [0, 1, 1, 1]) (by decide) s3312_0_1_1_1
  917. private theorem s3312_1_0_0_1 : Outcome [3, 3, 1, 2] [1, 0, 0, 1] true := Outcome.winning (q := [0, 0, 0, 1]) (by decide) s3312_0_0_0_1
  918. private theorem s3312_1_0_1_0 : Outcome [3, 3, 1, 2] [1, 0, 1, 0] true := Outcome.winning (q := [0, 0, 1, 0]) (by decide) s3312_0_0_1_0
  919. private theorem s3312_1_0_1_1 : Outcome [3, 3, 1, 2] [1, 0, 1, 1] false := by
  920. apply Outcome.losing (by decide)
  921. intro q hq
  922. have eqs : options [3, 3, 1, 2] [1, 0, 1, 1] = [[0, 0, 1, 1], [1, 0, 0, 1], [1, 0, 1, 0]] := by decide
  923. rw [eqs] at hq
  924. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  925. rcases hq with rfl | rfl | rfl
  926. · exact s3312_0_0_1_1
  927. · exact s3312_1_0_0_1
  928. · exact s3312_1_0_1_0
  929. private theorem s3312_3_0_1_1 : Outcome [3, 3, 1, 2] [3, 0, 1, 1] true := Outcome.winning (q := [1, 0, 1, 1]) (by decide) s3312_1_0_1_1
  930. private theorem s3312_2_0_1_1 : Outcome [3, 3, 1, 2] [2, 0, 1, 1] true := Outcome.winning (q := [1, 0, 1, 1]) (by decide) s3312_1_0_1_1
  931. private theorem s3312_1_0_0_0 : Outcome [3, 3, 1, 2] [1, 0, 0, 0] false := by
  932. apply Outcome.losing (by decide)
  933. intro q hq
  934. have eqs : options [3, 3, 1, 2] [1, 0, 0, 0] = [[0, 0, 0, 0]] := by decide
  935. rw [eqs] at hq
  936. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  937. subst q
  938. exact s3312_0_0_0_0
  939. private theorem s3312_3_0_0_0 : Outcome [3, 3, 1, 2] [3, 0, 0, 0] true := Outcome.winning (q := [1, 0, 0, 0]) (by decide) s3312_1_0_0_0
  940. private theorem s3312_2_0_0_0 : Outcome [3, 3, 1, 2] [2, 0, 0, 0] true := Outcome.winning (q := [1, 0, 0, 0]) (by decide) s3312_1_0_0_0
  941. private theorem s3312_4_0_0_0 : Outcome [3, 3, 1, 2] [4, 0, 0, 0] false := by
  942. apply Outcome.losing (by decide)
  943. intro q hq
  944. have eqs : options [3, 3, 1, 2] [4, 0, 0, 0] = [[3, 0, 0, 0], [2, 0, 0, 0]] := by decide
  945. rw [eqs] at hq
  946. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  947. rcases hq with rfl | rfl
  948. · exact s3312_3_0_0_0
  949. · exact s3312_2_0_0_0
  950. private theorem s3312_4_0_0_1 : Outcome [3, 3, 1, 2] [4, 0, 0, 1] true := Outcome.winning (q := [4, 0, 0, 0]) (by decide) s3312_4_0_0_0
  951. private theorem s3312_4_0_1_0 : Outcome [3, 3, 1, 2] [4, 0, 1, 0] true := Outcome.winning (q := [4, 0, 0, 0]) (by decide) s3312_4_0_0_0
  952. private theorem s3312_4_0_1_1 : Outcome [3, 3, 1, 2] [4, 0, 1, 1] false := by
  953. apply Outcome.losing (by decide)
  954. intro q hq
  955. have eqs : options [3, 3, 1, 2] [4, 0, 1, 1] = [[3, 0, 1, 1], [2, 0, 1, 1], [4, 0, 0, 1], [4, 0, 1, 0]] := by decide
  956. rw [eqs] at hq
  957. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  958. rcases hq with rfl | rfl | rfl | rfl
  959. · exact s3312_3_0_1_1
  960. · exact s3312_2_0_1_1
  961. · exact s3312_4_0_0_1
  962. · exact s3312_4_0_1_0
  963. private theorem s3312_4_1_1_1 : Outcome [3, 3, 1, 2] [4, 1, 1, 1] true := Outcome.winning (q := [4, 0, 1, 1]) (by decide) s3312_4_0_1_1
  964. private theorem s3312_3_1_1_1 : Outcome [3, 3, 1, 2] [3, 1, 1, 1] true := Outcome.winning (q := [0, 1, 1, 1]) (by decide) s3312_0_1_1_1
  965. private theorem s3312_1_1_1_1 : Outcome [3, 3, 1, 2] [1, 1, 1, 1] true := Outcome.winning (q := [0, 1, 1, 1]) (by decide) s3312_0_1_1_1
  966. private theorem s3312_5_0_1_1 : Outcome [3, 3, 1, 2] [5, 0, 1, 1] true := Outcome.winning (q := [4, 0, 1, 1]) (by decide) s3312_4_0_1_1
  967. private theorem s3312_0_1_0_0 : Outcome [3, 3, 1, 2] [0, 1, 0, 0] false := by
  968. apply Outcome.losing (by decide)
  969. intro q hq
  970. have eqs : options [3, 3, 1, 2] [0, 1, 0, 0] = [[0, 0, 0, 0]] := by decide
  971. rw [eqs] at hq
  972. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  973. subst q
  974. exact s3312_0_0_0_0
  975. private theorem s3312_1_1_0_0 : Outcome [3, 3, 1, 2] [1, 1, 0, 0] true := Outcome.winning (q := [0, 1, 0, 0]) (by decide) s3312_0_1_0_0
  976. private theorem s3312_1_1_0_1 : Outcome [3, 3, 1, 2] [1, 1, 0, 1] false := by
  977. apply Outcome.losing (by decide)
  978. intro q hq
  979. have eqs : options [3, 3, 1, 2] [1, 1, 0, 1] = [[0, 1, 0, 1], [1, 0, 0, 1], [1, 1, 0, 0]] := by decide
  980. rw [eqs] at hq
  981. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  982. rcases hq with rfl | rfl | rfl
  983. · exact s3312_0_1_0_1
  984. · exact s3312_1_0_0_1
  985. · exact s3312_1_1_0_0
  986. private theorem s3312_3_1_0_1 : Outcome [3, 3, 1, 2] [3, 1, 0, 1] true := Outcome.winning (q := [1, 1, 0, 1]) (by decide) s3312_1_1_0_1
  987. private theorem s3312_2_1_0_1 : Outcome [3, 3, 1, 2] [2, 1, 0, 1] true := Outcome.winning (q := [1, 1, 0, 1]) (by decide) s3312_1_1_0_1
  988. private theorem s3312_4_1_0_0 : Outcome [3, 3, 1, 2] [4, 1, 0, 0] true := Outcome.winning (q := [4, 0, 0, 0]) (by decide) s3312_4_0_0_0
  989. private theorem s3312_4_1_0_1 : Outcome [3, 3, 1, 2] [4, 1, 0, 1] false := by
  990. apply Outcome.losing (by decide)
  991. intro q hq
  992. have eqs : options [3, 3, 1, 2] [4, 1, 0, 1] = [[3, 1, 0, 1], [2, 1, 0, 1], [4, 0, 0, 1], [4, 1, 0, 0]] := by decide
  993. rw [eqs] at hq
  994. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  995. rcases hq with rfl | rfl | rfl | rfl
  996. · exact s3312_3_1_0_1
  997. · exact s3312_2_1_0_1
  998. · exact s3312_4_0_0_1
  999. · exact s3312_4_1_0_0
  1000. private theorem s3312_5_1_0_1 : Outcome [3, 3, 1, 2] [5, 1, 0, 1] true := Outcome.winning (q := [4, 1, 0, 1]) (by decide) s3312_4_1_0_1
  1001. private theorem s3312_1_1_1_0 : Outcome [3, 3, 1, 2] [1, 1, 1, 0] false := by
  1002. apply Outcome.losing (by decide)
  1003. intro q hq
  1004. have eqs : options [3, 3, 1, 2] [1, 1, 1, 0] = [[0, 1, 1, 0], [1, 0, 1, 0], [1, 1, 0, 0]] := by decide
  1005. rw [eqs] at hq
  1006. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  1007. rcases hq with rfl | rfl | rfl
  1008. · exact s3312_0_1_1_0
  1009. · exact s3312_1_0_1_0
  1010. · exact s3312_1_1_0_0
  1011. private theorem s3312_3_1_1_0 : Outcome [3, 3, 1, 2] [3, 1, 1, 0] true := Outcome.winning (q := [1, 1, 1, 0]) (by decide) s3312_1_1_1_0
  1012. private theorem s3312_2_1_1_0 : Outcome [3, 3, 1, 2] [2, 1, 1, 0] true := Outcome.winning (q := [1, 1, 1, 0]) (by decide) s3312_1_1_1_0
  1013. private theorem s3312_4_1_1_0 : Outcome [3, 3, 1, 2] [4, 1, 1, 0] false := by
  1014. apply Outcome.losing (by decide)
  1015. intro q hq
  1016. have eqs : options [3, 3, 1, 2] [4, 1, 1, 0] = [[3, 1, 1, 0], [2, 1, 1, 0], [4, 0, 1, 0], [4, 1, 0, 0]] := by decide
  1017. rw [eqs] at hq
  1018. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  1019. rcases hq with rfl | rfl | rfl | rfl
  1020. · exact s3312_3_1_1_0
  1021. · exact s3312_2_1_1_0
  1022. · exact s3312_4_0_1_0
  1023. · exact s3312_4_1_0_0
  1024. private theorem s3312_5_1_1_0 : Outcome [3, 3, 1, 2] [5, 1, 1, 0] true := Outcome.winning (q := [4, 1, 1, 0]) (by decide) s3312_4_1_1_0
  1025. private theorem s3312_5_1_1_1 : Outcome [3, 3, 1, 2] [5, 1, 1, 1] false := by
  1026. apply Outcome.losing (by decide)
  1027. intro q hq
  1028. have eqs : options [3, 3, 1, 2] [5, 1, 1, 1] = [[4, 1, 1, 1], [3, 1, 1, 1], [1, 1, 1, 1], [5, 0, 1, 1], [5, 1, 0, 1], [5, 1, 1, 0]] := by decide
  1029. rw [eqs] at hq
  1030. simp only [List.mem_cons, List.not_mem_nil, or_false] at hq
  1031. rcases hq with rfl | rfl | rfl | rfl | rfl | rfl
  1032. · exact s3312_4_1_1_1
  1033. · exact s3312_3_1_1_1
  1034. · exact s3312_1_1_1_1
  1035. · exact s3312_5_0_1_1
  1036. · exact s3312_5_1_0_1
  1037. · exact s3312_5_1_1_0
  1038. theorem fixed_heap_witness_3102 :
  1039. ∃ a b x y : Nat, 0 < a ∧ 0 < b ∧ 0 < x ∧ 0 < y ∧
  1040. Outcome [3, 1, 0, 2] [a,b,x,y] true ∧ Outcome [3, 1, 0, 2] [a+5,b,x,y] false := by
  1041. exact ⟨2, 1, 1, 1, by decide, by decide, by decide, by decide, s3102_2_1_1_1, s3102_7_1_1_1⟩
  1042. theorem fixed_heap_witness_3122 :
  1043. ∃ a b x y : Nat, 0 < a ∧ 0 < b ∧ 0 < x ∧ 0 < y ∧
  1044. Outcome [3, 1, 2, 2] [a,b,x,y] false ∧ Outcome [3, 1, 2, 2] [a+7,b,x,y] true := by
  1045. exact ⟨1, 1, 2, 2, by decide, by decide, by decide, by decide, s3122_1_1_2_2, s3122_8_1_2_2⟩
  1046. theorem fixed_heap_witness_3123 :
  1047. ∃ a b x y : Nat, 0 < a ∧ 0 < b ∧ 0 < x ∧ 0 < y ∧
  1048. Outcome [3, 1, 2, 3] [a,b,x,y] false ∧ Outcome [3, 1, 2, 3] [a+7,b,x,y] true := by
  1049. exact ⟨1, 1, 2, 2, by decide, by decide, by decide, by decide, s3123_1_1_2_2, s3123_8_1_2_2⟩
  1050. theorem fixed_heap_witness_3312 :
  1051. ∃ a b x y : Nat, 0 < a ∧ 0 < b ∧ 0 < x ∧ 0 < y ∧
  1052. Outcome [3, 3, 1, 2] [a,b,x,y] true ∧ Outcome [3, 3, 1, 2] [a+3,b,x,y] false := by
  1053. exact ⟨2, 1, 1, 1, by decide, by decide, by decide, by decide, s3312_2_1_1_1, s3312_5_1_1_1⟩
  1054. end Quaternary