Download lean/OAI/LinearAlgebra/MatrixFields/Certificates/NativeSharp.lean from roseking/openAI-math-dataset: direct link, hf CLI and curl.
- Browser
- Download file 26.5 kB
-
https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/LinearAlgebra/MatrixFields/Certificates/NativeSharp.lean
- Command line
-
hf download hf://datasets/roseking/openAI-math-dataset/lean/OAI/LinearAlgebra/MatrixFields/Certificates/NativeSharp.lean
-
curl -L -o NativeSharp.lean https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/LinearAlgebra/MatrixFields/Certificates/NativeSharp.lean
26.5 kB
| import Mathlib | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA1_1_14I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA1_1_14I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA1_1_14I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA1_2_13I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA1_2_13I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA1_2_13I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA1_3_12I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA1_3_12I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA1_3_12I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA1_4_11I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA1_4_11I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA1_4_11I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA1_5_10I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA1_5_10I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA1_5_10I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA1_6_9I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA1_6_9I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA1_6_9I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA1_7_8I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA1_7_8I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA1_7_8I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA2_2_12I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA2_2_12I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA2_2_12I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA2_3_11I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA2_3_11I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA2_3_11I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA2_4_10I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA2_4_10I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA2_4_10I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA2_5_9I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA2_5_9I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA2_5_9I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA2_6_8I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA2_6_8I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA2_6_8I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA2_7_7I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA2_7_7I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA2_7_7I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA3_3_10I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA3_3_10I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA3_3_10I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA3_4_9I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA3_4_9I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA3_4_9I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA3_5_8I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA3_5_8I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA3_5_8I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA3_6_7I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA3_6_7I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA3_6_7I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA4_4_8I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA4_4_8I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA4_4_8I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA4_5_7I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA4_5_7I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA4_5_7I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA4_6_6I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA4_6_6I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA4_6_6I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA5_5_6I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA5_5_6I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityA.CapA5_5_6I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB1_1_6I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB1_1_6I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB1_1_6I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB1_2_5I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB1_2_5I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB1_2_5I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB1_3_4I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB1_3_4I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB1_3_4I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB1_4_3I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB1_4_3I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB1_4_3I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB1_5_2I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB1_5_2I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB1_5_2I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB1_6_1I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB1_6_1I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB1_6_1I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB2_1_5I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB2_1_5I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB2_1_5I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB2_2_4I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB2_2_4I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB2_2_4I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB2_3_3I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB2_3_3I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB2_3_3I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB2_4_2I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB2_4_2I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB2_4_2I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB2_5_1I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB2_5_1I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB2_5_1I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB3_1_4I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB3_1_4I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB3_1_4I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB3_2_3I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB3_2_3I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB3_2_3I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB3_3_2I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB3_3_2I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB3_3_2I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB3_4_1I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB3_4_1I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB3_4_1I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB4_1_3I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB4_1_3I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB4_1_3I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB4_2_2I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB4_2_2I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB4_2_2I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB4_3_1I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB4_3_1I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB4_3_1I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB5_1_2I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB5_1_2I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB5_1_2I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB5_2_1I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB5_2_1I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB5_2_1I2 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB6_1_1I0 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB6_1_1I1 | |
| import OAI.LinearAlgebra.MatrixFields.CapacityB.CapB6_1_1I2 | |
| namespace OAI | |
| namespace MatrixAllFields | |
| open scoped BigOperators Topology Polynomial | |
| section | |
| noncomputable section | |
| namespace MatrixMultiplication.NativeNumerics | |
| open AllFieldParameters AllFieldHistory AllFieldCertificates AllFieldCertificates.Replay | |
| open AllFieldInitialEntropyCertificate AllFieldNativeCapacity | |
| open scoped BigOperators | |
| def capacityABalls (s : Shape) (i : Fin 3) : Ball := | |
| match s 0, s 1, s 2 with | |
| | 1, 1, 14 => ((Matrix.vecCons (CA1_1_14I0H) (Matrix.vecCons (CA1_1_14I1H) (Matrix.vecCons (CA1_1_14I2H) Matrix.vecEmpty))) i) | |
| | 1, 2, 13 => ((Matrix.vecCons (CA1_2_13I0H) (Matrix.vecCons (CA1_2_13I1H) (Matrix.vecCons (CA1_2_13I2H) Matrix.vecEmpty))) i) | |
| | 1, 3, 12 => ((Matrix.vecCons (CA1_3_12I0H) (Matrix.vecCons (CA1_3_12I1H) (Matrix.vecCons (CA1_3_12I2H) Matrix.vecEmpty))) i) | |
| | 1, 4, 11 => ((Matrix.vecCons (CA1_4_11I0H) (Matrix.vecCons (CA1_4_11I1H) (Matrix.vecCons (CA1_4_11I2H) Matrix.vecEmpty))) i) | |
| | 1, 5, 10 => ((Matrix.vecCons (CA1_5_10I0H) (Matrix.vecCons (CA1_5_10I1H) (Matrix.vecCons (CA1_5_10I2H) Matrix.vecEmpty))) i) | |
| | 1, 6, 9 => ((Matrix.vecCons (CA1_6_9I0H) (Matrix.vecCons (CA1_6_9I1H) (Matrix.vecCons (CA1_6_9I2H) Matrix.vecEmpty))) i) | |
| | 1, 7, 8 => ((Matrix.vecCons (CA1_7_8I0H) (Matrix.vecCons (CA1_7_8I1H) (Matrix.vecCons (CA1_7_8I2H) Matrix.vecEmpty))) i) | |
| | 2, 2, 12 => ((Matrix.vecCons (CA2_2_12I0H) (Matrix.vecCons (CA2_2_12I1H) (Matrix.vecCons (CA2_2_12I2H) Matrix.vecEmpty))) i) | |
| | 2, 3, 11 => ((Matrix.vecCons (CA2_3_11I0H) (Matrix.vecCons (CA2_3_11I1H) (Matrix.vecCons (CA2_3_11I2H) Matrix.vecEmpty))) i) | |
| | 2, 4, 10 => ((Matrix.vecCons (CA2_4_10I0H) (Matrix.vecCons (CA2_4_10I1H) (Matrix.vecCons (CA2_4_10I2H) Matrix.vecEmpty))) i) | |
| | 2, 5, 9 => ((Matrix.vecCons (CA2_5_9I0H) (Matrix.vecCons (CA2_5_9I1H) (Matrix.vecCons (CA2_5_9I2H) Matrix.vecEmpty))) i) | |
| | 2, 6, 8 => ((Matrix.vecCons (CA2_6_8I0H) (Matrix.vecCons (CA2_6_8I1H) (Matrix.vecCons (CA2_6_8I2H) Matrix.vecEmpty))) i) | |
| | 2, 7, 7 => ((Matrix.vecCons (CA2_7_7I0H) (Matrix.vecCons (CA2_7_7I1H) (Matrix.vecCons (CA2_7_7I2H) Matrix.vecEmpty))) i) | |
| | 3, 3, 10 => ((Matrix.vecCons (CA3_3_10I0H) (Matrix.vecCons (CA3_3_10I1H) (Matrix.vecCons (CA3_3_10I2H) Matrix.vecEmpty))) i) | |
| | 3, 4, 9 => ((Matrix.vecCons (CA3_4_9I0H) (Matrix.vecCons (CA3_4_9I1H) (Matrix.vecCons (CA3_4_9I2H) Matrix.vecEmpty))) i) | |
| | 3, 5, 8 => ((Matrix.vecCons (CA3_5_8I0H) (Matrix.vecCons (CA3_5_8I1H) (Matrix.vecCons (CA3_5_8I2H) Matrix.vecEmpty))) i) | |
| | 3, 6, 7 => ((Matrix.vecCons (CA3_6_7I0H) (Matrix.vecCons (CA3_6_7I1H) (Matrix.vecCons (CA3_6_7I2H) Matrix.vecEmpty))) i) | |
| | 4, 4, 8 => ((Matrix.vecCons (CA4_4_8I0H) (Matrix.vecCons (CA4_4_8I1H) (Matrix.vecCons (CA4_4_8I2H) Matrix.vecEmpty))) i) | |
| | 4, 5, 7 => ((Matrix.vecCons (CA4_5_7I0H) (Matrix.vecCons (CA4_5_7I1H) (Matrix.vecCons (CA4_5_7I2H) Matrix.vecEmpty))) i) | |
| | 4, 6, 6 => ((Matrix.vecCons (CA4_6_6I0H) (Matrix.vecCons (CA4_6_6I1H) (Matrix.vecCons (CA4_6_6I2H) Matrix.vecEmpty))) i) | |
| | 5, 5, 6 => ((Matrix.vecCons (CA5_5_6I0H) (Matrix.vecCons (CA5_5_6I1H) (Matrix.vecCons (CA5_5_6I2H) Matrix.vecEmpty))) i) | |
| | _, _, _ => (.exact 0) | |
| lemma capacityABalls_sound (s : Shape) (hs : s ∈ positiveInitial) (i : Fin 3) : | |
| (capacityABalls s i).Encloses (stageACapacity s i) := by | |
| rw [positiveInitial_list] at hs | |
| simp only [List.mem_cons, List.not_mem_nil, or_false] at hs | |
| rcases hs with rfl | rfl | rfl | rfl | rfl | rfl | rfl | rfl | rfl | rfl | rfl | rfl | rfl | rfl | rfl | rfl | rfl | rfl | rfl | rfl | rfl | |
| · revert i | |
| exact forall_fin3 CA1_1_14I0_sound CA1_1_14I1_sound CA1_1_14I2_sound | |
| · revert i | |
| exact forall_fin3 CA1_2_13I0_sound CA1_2_13I1_sound CA1_2_13I2_sound | |
| · revert i | |
| exact forall_fin3 CA1_3_12I0_sound CA1_3_12I1_sound CA1_3_12I2_sound | |
| · revert i | |
| exact forall_fin3 CA1_4_11I0_sound CA1_4_11I1_sound CA1_4_11I2_sound | |
| · revert i | |
| exact forall_fin3 CA1_5_10I0_sound CA1_5_10I1_sound CA1_5_10I2_sound | |
| · revert i | |
| exact forall_fin3 CA1_6_9I0_sound CA1_6_9I1_sound CA1_6_9I2_sound | |
| · revert i | |
| exact forall_fin3 CA1_7_8I0_sound CA1_7_8I1_sound CA1_7_8I2_sound | |
| · revert i | |
| exact forall_fin3 CA2_2_12I0_sound CA2_2_12I1_sound CA2_2_12I2_sound | |
| · revert i | |
| exact forall_fin3 CA2_3_11I0_sound CA2_3_11I1_sound CA2_3_11I2_sound | |
| · revert i | |
| exact forall_fin3 CA2_4_10I0_sound CA2_4_10I1_sound CA2_4_10I2_sound | |
| · revert i | |
| exact forall_fin3 CA2_5_9I0_sound CA2_5_9I1_sound CA2_5_9I2_sound | |
| · revert i | |
| exact forall_fin3 CA2_6_8I0_sound CA2_6_8I1_sound CA2_6_8I2_sound | |
| · revert i | |
| exact forall_fin3 CA2_7_7I0_sound CA2_7_7I1_sound CA2_7_7I2_sound | |
| · revert i | |
| exact forall_fin3 CA3_3_10I0_sound CA3_3_10I1_sound CA3_3_10I2_sound | |
| · revert i | |
| exact forall_fin3 CA3_4_9I0_sound CA3_4_9I1_sound CA3_4_9I2_sound | |
| · revert i | |
| exact forall_fin3 CA3_5_8I0_sound CA3_5_8I1_sound CA3_5_8I2_sound | |
| · revert i | |
| exact forall_fin3 CA3_6_7I0_sound CA3_6_7I1_sound CA3_6_7I2_sound | |
| · revert i | |
| exact forall_fin3 CA4_4_8I0_sound CA4_4_8I1_sound CA4_4_8I2_sound | |
| · revert i | |
| exact forall_fin3 CA4_5_7I0_sound CA4_5_7I1_sound CA4_5_7I2_sound | |
| · revert i | |
| exact forall_fin3 CA4_6_6I0_sound CA4_6_6I1_sound CA4_6_6I2_sound | |
| · revert i | |
| exact forall_fin3 CA5_5_6I0_sound CA5_5_6I1_sound CA5_5_6I2_sound | |
| def nativeLABall (i : Fin 3) : Ball := (Matrix.vecCons (⟨(117985629820354604769702009255473 / 100000000000000000000000000000000), (25286853793 / 25000000000000000000000000000000)⟩) (Matrix.vecCons (⟨(14553362614718917509713695395419 / 12500000000000000000000000000000), (495362055017 / 100000000000000000000000000000000)⟩) (Matrix.vecCons (⟨(13508474414138305071843256242429 / 12500000000000000000000000000000), (467443928227 / 100000000000000000000000000000000)⟩) Matrix.vecEmpty))) i | |
| lemma nativeLABall_sound_0 : (nativeLABall 0).Encloses (nativeLA 0) := by | |
| exact contains_sound (listSumBall_sound positiveInitial | |
| (fun s => .mul (initialProbs s) (capacityABalls s 0)) _ | |
| (fun s hs => Ball.mul_sound (initialProbs_sound s (List.mem_filter.mp hs).1) | |
| (capacityABalls_sound s hs 0))) (by decide +kernel) | |
| lemma nativeLABall_sound_1 : (nativeLABall 1).Encloses (nativeLA 1) := by | |
| exact contains_sound (listSumBall_sound positiveInitial | |
| (fun s => .mul (initialProbs s) (capacityABalls s 1)) _ | |
| (fun s hs => Ball.mul_sound (initialProbs_sound s (List.mem_filter.mp hs).1) | |
| (capacityABalls_sound s hs 1))) (by decide +kernel) | |
| lemma nativeLABall_sound_2 : (nativeLABall 2).Encloses (nativeLA 2) := by | |
| exact contains_sound (listSumBall_sound positiveInitial | |
| (fun s => .mul (initialProbs s) (capacityABalls s 2)) _ | |
| (fun s hs => Ball.mul_sound (initialProbs_sound s (List.mem_filter.mp hs).1) | |
| (capacityABalls_sound s hs 2))) (by decide +kernel) | |
| lemma nativeLABall_sound (i : Fin 3) : (nativeLABall i).Encloses (nativeLA i) := by | |
| revert i | |
| exact forall_fin3 nativeLABall_sound_0 nativeLABall_sound_1 nativeLABall_sound_2 | |
| theorem native_stageA_positive (i : Fin 3) : 0 < nativeLA i := by | |
| have hp : 0 < (nativeLABall i).lower := by fin_cases i <;> decide +kernel | |
| have hp' : (0 : ℝ) < (nativeLABall i).lower := by exact_mod_cast hp | |
| exact hp'.trans_le (Ball.bounds (nativeLABall_sound i)).1 | |
| def capacityBBalls (s : Shape) (i : Fin 3) : Ball := | |
| match s 0, s 1, s 2 with | |
| | 1, 1, 6 => ((Matrix.vecCons (CB1_1_6I0H) (Matrix.vecCons (CB1_1_6I1H) (Matrix.vecCons (CB1_1_6I2H) Matrix.vecEmpty))) i) | |
| | 1, 2, 5 => ((Matrix.vecCons (CB1_2_5I0H) (Matrix.vecCons (CB1_2_5I1H) (Matrix.vecCons (CB1_2_5I2H) Matrix.vecEmpty))) i) | |
| | 1, 3, 4 => ((Matrix.vecCons (CB1_3_4I0H) (Matrix.vecCons (CB1_3_4I1H) (Matrix.vecCons (CB1_3_4I2H) Matrix.vecEmpty))) i) | |
| | 1, 4, 3 => ((Matrix.vecCons (CB1_4_3I0H) (Matrix.vecCons (CB1_4_3I1H) (Matrix.vecCons (CB1_4_3I2H) Matrix.vecEmpty))) i) | |
| | 1, 5, 2 => ((Matrix.vecCons (CB1_5_2I0H) (Matrix.vecCons (CB1_5_2I1H) (Matrix.vecCons (CB1_5_2I2H) Matrix.vecEmpty))) i) | |
| | 1, 6, 1 => ((Matrix.vecCons (CB1_6_1I0H) (Matrix.vecCons (CB1_6_1I1H) (Matrix.vecCons (CB1_6_1I2H) Matrix.vecEmpty))) i) | |
| | 2, 1, 5 => ((Matrix.vecCons (CB2_1_5I0H) (Matrix.vecCons (CB2_1_5I1H) (Matrix.vecCons (CB2_1_5I2H) Matrix.vecEmpty))) i) | |
| | 2, 2, 4 => ((Matrix.vecCons (CB2_2_4I0H) (Matrix.vecCons (CB2_2_4I1H) (Matrix.vecCons (CB2_2_4I2H) Matrix.vecEmpty))) i) | |
| | 2, 3, 3 => ((Matrix.vecCons (CB2_3_3I0H) (Matrix.vecCons (CB2_3_3I1H) (Matrix.vecCons (CB2_3_3I2H) Matrix.vecEmpty))) i) | |
| | 2, 4, 2 => ((Matrix.vecCons (CB2_4_2I0H) (Matrix.vecCons (CB2_4_2I1H) (Matrix.vecCons (CB2_4_2I2H) Matrix.vecEmpty))) i) | |
| | 2, 5, 1 => ((Matrix.vecCons (CB2_5_1I0H) (Matrix.vecCons (CB2_5_1I1H) (Matrix.vecCons (CB2_5_1I2H) Matrix.vecEmpty))) i) | |
| | 3, 1, 4 => ((Matrix.vecCons (CB3_1_4I0H) (Matrix.vecCons (CB3_1_4I1H) (Matrix.vecCons (CB3_1_4I2H) Matrix.vecEmpty))) i) | |
| | 3, 2, 3 => ((Matrix.vecCons (CB3_2_3I0H) (Matrix.vecCons (CB3_2_3I1H) (Matrix.vecCons (CB3_2_3I2H) Matrix.vecEmpty))) i) | |
| | 3, 3, 2 => ((Matrix.vecCons (CB3_3_2I0H) (Matrix.vecCons (CB3_3_2I1H) (Matrix.vecCons (CB3_3_2I2H) Matrix.vecEmpty))) i) | |
| | 3, 4, 1 => ((Matrix.vecCons (CB3_4_1I0H) (Matrix.vecCons (CB3_4_1I1H) (Matrix.vecCons (CB3_4_1I2H) Matrix.vecEmpty))) i) | |
| | 4, 1, 3 => ((Matrix.vecCons (CB4_1_3I0H) (Matrix.vecCons (CB4_1_3I1H) (Matrix.vecCons (CB4_1_3I2H) Matrix.vecEmpty))) i) | |
| | 4, 2, 2 => ((Matrix.vecCons (CB4_2_2I0H) (Matrix.vecCons (CB4_2_2I1H) (Matrix.vecCons (CB4_2_2I2H) Matrix.vecEmpty))) i) | |
| | 4, 3, 1 => ((Matrix.vecCons (CB4_3_1I0H) (Matrix.vecCons (CB4_3_1I1H) (Matrix.vecCons (CB4_3_1I2H) Matrix.vecEmpty))) i) | |
| | 5, 1, 2 => ((Matrix.vecCons (CB5_1_2I0H) (Matrix.vecCons (CB5_1_2I1H) (Matrix.vecCons (CB5_1_2I2H) Matrix.vecEmpty))) i) | |
| | 5, 2, 1 => ((Matrix.vecCons (CB5_2_1I0H) (Matrix.vecCons (CB5_2_1I1H) (Matrix.vecCons (CB5_2_1I2H) Matrix.vecEmpty))) i) | |
| | 6, 1, 1 => ((Matrix.vecCons (CB6_1_1I0H) (Matrix.vecCons (CB6_1_1I1H) (Matrix.vecCons (CB6_1_1I2H) Matrix.vecEmpty))) i) | |
| | _, _, _ => (.exact 0) | |
| lemma capacityBBalls_sound (s : Shape) (hs : s ∈ positiveSecond) (i : Fin 3) : | |
| (capacityBBalls s i).Encloses (stageBCapacity s i) := by | |
| rw [positiveSecond_list] at hs | |
| simp only [List.mem_cons, List.not_mem_nil, or_false] at hs | |
| rcases hs with rfl | rfl | rfl | rfl | rfl | rfl | rfl | rfl | rfl | rfl | rfl | rfl | rfl | rfl | rfl | rfl | rfl | rfl | rfl | rfl | rfl | |
| · revert i | |
| exact forall_fin3 CB1_1_6I0_sound CB1_1_6I1_sound CB1_1_6I2_sound | |
| · revert i | |
| exact forall_fin3 CB1_2_5I0_sound CB1_2_5I1_sound CB1_2_5I2_sound | |
| · revert i | |
| exact forall_fin3 CB1_3_4I0_sound CB1_3_4I1_sound CB1_3_4I2_sound | |
| · revert i | |
| exact forall_fin3 CB1_4_3I0_sound CB1_4_3I1_sound CB1_4_3I2_sound | |
| · revert i | |
| exact forall_fin3 CB1_5_2I0_sound CB1_5_2I1_sound CB1_5_2I2_sound | |
| · revert i | |
| exact forall_fin3 CB1_6_1I0_sound CB1_6_1I1_sound CB1_6_1I2_sound | |
| · revert i | |
| exact forall_fin3 CB2_1_5I0_sound CB2_1_5I1_sound CB2_1_5I2_sound | |
| · revert i | |
| exact forall_fin3 CB2_2_4I0_sound CB2_2_4I1_sound CB2_2_4I2_sound | |
| · revert i | |
| exact forall_fin3 CB2_3_3I0_sound CB2_3_3I1_sound CB2_3_3I2_sound | |
| · revert i | |
| exact forall_fin3 CB2_4_2I0_sound CB2_4_2I1_sound CB2_4_2I2_sound | |
| · revert i | |
| exact forall_fin3 CB2_5_1I0_sound CB2_5_1I1_sound CB2_5_1I2_sound | |
| · revert i | |
| exact forall_fin3 CB3_1_4I0_sound CB3_1_4I1_sound CB3_1_4I2_sound | |
| · revert i | |
| exact forall_fin3 CB3_2_3I0_sound CB3_2_3I1_sound CB3_2_3I2_sound | |
| · revert i | |
| exact forall_fin3 CB3_3_2I0_sound CB3_3_2I1_sound CB3_3_2I2_sound | |
| · revert i | |
| exact forall_fin3 CB3_4_1I0_sound CB3_4_1I1_sound CB3_4_1I2_sound | |
| · revert i | |
| exact forall_fin3 CB4_1_3I0_sound CB4_1_3I1_sound CB4_1_3I2_sound | |
| · revert i | |
| exact forall_fin3 CB4_2_2I0_sound CB4_2_2I1_sound CB4_2_2I2_sound | |
| · revert i | |
| exact forall_fin3 CB4_3_1I0_sound CB4_3_1I1_sound CB4_3_1I2_sound | |
| · revert i | |
| exact forall_fin3 CB5_1_2I0_sound CB5_1_2I1_sound CB5_1_2I2_sound | |
| · revert i | |
| exact forall_fin3 CB5_2_1I0_sound CB5_2_1I1_sound CB5_2_1I2_sound | |
| · revert i | |
| exact forall_fin3 CB6_1_1I0_sound CB6_1_1I1_sound CB6_1_1I2_sound | |
| def nativeLBBall (i : Fin 3) : Ball := (Matrix.vecCons (⟨(36915911542259422191174414642177 / 25000000000000000000000000000000), (143554434849 / 100000000000000000000000000000000)⟩) (Matrix.vecCons (⟨(32908978604932824344186869459233 / 20000000000000000000000000000000), (610647767219 / 100000000000000000000000000000000)⟩) (Matrix.vecCons (⟨(64721008843697680778152495140253 / 50000000000000000000000000000000), (102799797137 / 20000000000000000000000000000000)⟩) Matrix.vecEmpty))) i | |
| lemma nativeLBBall_sound_0 : (nativeLBBall 0).Encloses (nativeLB 0) := by | |
| exact contains_sound (listSumBall_sound positiveSecond | |
| (fun s => .mul (secondProbs s) (capacityBBalls s 0)) _ | |
| (fun s hs => Ball.mul_sound (secondProbs_sound s (List.mem_filter.mp hs).1) | |
| (capacityBBalls_sound s hs 0))) (by decide +kernel) | |
| lemma nativeLBBall_sound_1 : (nativeLBBall 1).Encloses (nativeLB 1) := by | |
| exact contains_sound (listSumBall_sound positiveSecond | |
| (fun s => .mul (secondProbs s) (capacityBBalls s 1)) _ | |
| (fun s hs => Ball.mul_sound (secondProbs_sound s (List.mem_filter.mp hs).1) | |
| (capacityBBalls_sound s hs 1))) (by decide +kernel) | |
| lemma nativeLBBall_sound_2 : (nativeLBBall 2).Encloses (nativeLB 2) := by | |
| exact contains_sound (listSumBall_sound positiveSecond | |
| (fun s => .mul (secondProbs s) (capacityBBalls s 2)) _ | |
| (fun s hs => Ball.mul_sound (secondProbs_sound s (List.mem_filter.mp hs).1) | |
| (capacityBBalls_sound s hs 2))) (by decide +kernel) | |
| lemma nativeLBBall_sound (i : Fin 3) : (nativeLBBall i).Encloses (nativeLB i) := by | |
| revert i | |
| exact forall_fin3 nativeLBBall_sound_0 nativeLBBall_sound_1 nativeLBBall_sound_2 | |
| theorem native_stageB_positive (i : Fin 3) : 0 < nativeLB i := by | |
| have hp : 0 < (nativeLBBall i).lower := by fin_cases i <;> decide +kernel | |
| have hp' : (0 : ℝ) < (nativeLBBall i).lower := by exact_mod_cast hp | |
| exact hp'.trans_le (Ball.bounds (nativeLBBall_sound i)).1 | |
| end MatrixMultiplication.NativeNumerics | |
| end | |
| end | |
| end MatrixAllFields | |
| namespace MatrixAllFields | |
| open scoped BigOperators Topology Polynomial | |
| section | |
| noncomputable section | |
| namespace MatrixMultiplication.NativeNumerics | |
| open AllFieldParameters AllFieldHistory AllFieldCertificates AllFieldCertificates.Replay | |
| open AllFieldInitialEntropyCertificate AllFieldNativeCapacity | |
| open scoped BigOperators | |
| open AllFieldTerminalRates AllFieldInitialEntropy | |
| def nativeCstarBall : Ball := ⟨(23573978636551704730344303484969 / 6250000000000000000000000000000), (4390100049 / 500000000000000000000000000000)⟩ | |
| lemma nativeCstarBall_sound : nativeCstarBall.Encloses nativeCstar := by | |
| have hb := contains_sound (Ball.add_sound nativeBBall_sound | |
| (Ball.mul_sound (finSumBall_sound 3 (fun i => .add (nativeLABall i) (nativeLBBall i)) | |
| (fun i => nativeLA i + nativeLB i) | |
| (fun i => Ball.add_sound (nativeLABall_sound i) (nativeLBBall_sound i))) | |
| (show (Ball.exact (1/3)).Encloses (1/(3 : ℝ)) by | |
| convert Ball.exact_sound (1/3) using 1 | |
| norm_num))) | |
| (show contains (.add nativeBBall | |
| (.mul (finSumBall 3 (fun i => .add (nativeLABall i) (nativeLBBall i))) (.exact (1/3)))) | |
| nativeCstarBall = true by decide +kernel) | |
| simpa only [nativeCstar, Staggering.totalCapacity, one_div, div_eq_mul_inv, one_mul] using hb | |
| def nativeCBall (i : Fin 3) : Ball := (Matrix.vecCons (⟨(111534382195434982151109187935323 / 100000000000000000000000000000000), (1122721859821 / 100000000000000000000000000000000)⟩) (Matrix.vecCons (⟨(96211864242411813886864945299987 / 100000000000000000000000000000000), (496007458009 / 25000000000000000000000000000000)⟩) (Matrix.vecCons (⟨(69836922592162736777228907769783 / 50000000000000000000000000000000), (29054108183 / 1562500000000000000000000000000)⟩) Matrix.vecEmpty))) i | |
| lemma nativeCBall_sound (i : Fin 3) : | |
| (nativeCBall i).Encloses (nativeCstar - (nativeLA i + nativeLB i)) := by | |
| have hcheck : contains (.add nativeCstarBall (.neg (.add (nativeLABall i) (nativeLBBall i)))) | |
| (nativeCBall i) = true := by fin_cases i <;> decide +kernel | |
| simpa only [sub_eq_add_neg] using contains_sound (Ball.add_sound nativeCstarBall_sound | |
| (Ball.neg_sound (Ball.add_sound (nativeLABall_sound i) (nativeLBBall_sound i)))) hcheck | |
| theorem native_stageC_feasible (i : Fin 3) : | |
| nativeCstar - (nativeLA i + nativeLB i) < nativeHigh := by | |
| have hp : (nativeCBall i).upper < nativeHighBall.lower := by fin_cases i <;> decide +kernel | |
| have hp' : ((nativeCBall i).upper : ℝ) < nativeHighBall.lower := by exact_mod_cast hp | |
| exact (Ball.bounds (nativeCBall_sound i)).2.trans_lt | |
| (hp'.trans_le (Ball.bounds nativeHighBall_sound).1) | |
| theorem native_stageC_balanced_positive (i : Fin 3) : 0 < nativeLC nativeLambda i := by | |
| rw [nativeLC_balanced native_denominator_gap] | |
| have hp : 0 < (nativeCBall i).lower := by fin_cases i <;> decide +kernel | |
| have hp' : (0 : ℝ) < (nativeCBall i).lower := by exact_mod_cast hp | |
| exact hp'.trans_le (Ball.bounds (nativeCBall_sound i)).1 | |
| def nativeGapBall : Ball := ⟨(132303397031313521 / 100000000000000000000000000000000), (970498095253 / 50000000000000000000000000000000)⟩ | |
| lemma nativeGapBall_sound : nativeGapBall.Encloses | |
| (nativeH0 + nativeCstar + ((2371054886006746 : ℝ)/10^15)*S/3 - 8*Real.log 7) := by | |
| have ht : (Ball.exact (2371054886006746 / 10^15)).Encloses ((2371054886006746 : ℝ)/10^15) := by | |
| convert Ball.exact_sound (2371054886006746 / 10^15) using 1 | |
| norm_num | |
| have hi : (Ball.exact (1/3)).Encloses (1/(3 : ℝ)) := by | |
| convert Ball.exact_sound (1/3) using 1 | |
| norm_num | |
| have he : (Ball.exact 8).Encloses (8 : ℝ) := by | |
| simpa only [Rat.cast_ofNat] using Ball.exact_sound 8 | |
| have hb := contains_sound (Ball.add_sound | |
| (Ball.add_sound (Ball.add_sound nativeH0_enclosed nativeCstarBall_sound) | |
| (Ball.mul_sound (Ball.mul_sound ht nativeSBall_sound) hi)) | |
| (Ball.neg_sound (Ball.mul_sound he logN7_sound))) | |
| (show contains (.add (.add (.add initialEntropyBall nativeCstarBall) | |
| (.mul (.mul (.exact (2371054886006746 / 10^15)) nativeSBall) (.exact (1/3)))) | |
| (.neg (.mul (.exact 8) logN7))) nativeGapBall = true by decide +kernel) | |
| simpa only [one_div, div_eq_mul_inv, one_mul, sub_eq_add_neg] using hb | |
| theorem native_sharp_gap : | |
| 0 < nativeH0 + nativeCstar + ((2371054886006746 : ℝ)/10^15)*S/3 - 8*Real.log 7 := by | |
| have hp : (0 : ℝ) < nativeGapBall.lower := by norm_num [nativeGapBall, Ball.lower] | |
| exact hp.trans_le (Ball.bounds nativeGapBall_sound).1 | |
| theorem native_sharp_rate_bound : | |
| 3 * (8 * Real.log 7 - (nativeH0 + nativeCstar)) / S < (2371054886006746 : ℝ)/10^15 := by | |
| apply (div_lt_iff₀ native_volume_positive).mpr | |
| have hg := native_sharp_gap | |
| linarith | |
| end MatrixMultiplication.NativeNumerics | |
| end | |
| end | |
| end MatrixAllFields | |
| end OAI | |