openAI-math-dataset / lean /OAI /LinearAlgebra /MatrixMultiplication /FieldGroups /BranchDesignation.lean
Download lean/OAI/LinearAlgebra/MatrixMultiplication/FieldGroups/BranchDesignation.lean from roseking/openAI-math-dataset: direct link, hf CLI and curl.
- Browser
- Download file 2.26 kB
-
https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/LinearAlgebra/MatrixMultiplication/FieldGroups/BranchDesignation.lean
- Command line
-
hf download hf://datasets/roseking/openAI-math-dataset/lean/OAI/LinearAlgebra/MatrixMultiplication/FieldGroups/BranchDesignation.lean
-
curl -L -o BranchDesignation.lean https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/LinearAlgebra/MatrixMultiplication/FieldGroups/BranchDesignation.lean
2.26 kB
| import OAI.LinearAlgebra.MatrixMultiplication.FieldGroups.NativeLaws | |
| namespace OAI | |
| /-! Group assignments, orbit counts and extraction capacities. -/ | |
| noncomputable section | |
| namespace MatrixMultiplication.AllFieldGroupBranchDesignation | |
| open AllFieldHistory AllFieldHistoryChildLaws AllFieldGroupOrbitData | |
| open AllFieldGroupNativeLaws | |
| attribute [local instance] Classical.propDecidable Classical.decEq | |
| def nativeBranchDesignated {K : ℕ} (w : Work K) (right : Bool) | |
| (side : Fin 3) (b : w.Branch) : Prop := | |
| w.stage ≠ 2 ∧ AllFieldNativeCapacity.designated w.priority side | |
| (halfShape w.parentShape (w.splitShape b) right) | |
| theorem sharing_iff_stage_ne_two {K tick : ℕ} {sigma : Placement} | |
| (h : ActiveOrder K tick sigma) : | |
| sharing h = true ↔ h.val.val.1.stage ≠ 2 := by | |
| rcases h with ⟨⟨⟨work, _⟩, _⟩, _⟩ | |
| cases work <;> simp [sharing, Work.stage] | |
| theorem order_branch_childWeight {K tick : ℕ} {sigma : Placement} | |
| (right : Bool) (h : ActiveOrder K tick sigma) (side : Fin 3) | |
| (b : h.val.val.1.Branch) : | |
| childWeight right h.val (branchShape h.val.val b) (sigma side) = | |
| (halfShape h.val.val.1.parentShape (h.val.val.1.splitShape b) right) | |
| (h.val.val.1.priority side) := by | |
| rw [← halfShape_childWeight, canonicalChildShape_branchShape, | |
| placement_symm_order_side] | |
| theorem designated_branchShape {K tick : ℕ} {sigma : Placement} | |
| (right : Bool) (side : Fin 3) (h : ActiveOrder K tick sigma) | |
| (hside : side ≠ 0) (b : h.val.val.1.Branch) : | |
| AllFieldGroupOrbitData.designated right side sigma h (branchShape h.val.val b) ↔ | |
| nativeBranchDesignated h.val.val.1 right side b := by | |
| change (sharing h = true ∧ | |
| (if side = 1 then childWeight right h.val (branchShape h.val.val b) (sigma 2) = 0 | |
| else if side = 2 then | |
| childWeight right h.val (branchShape h.val.val b) (sigma 0) * | |
| childWeight right h.val (branchShape h.val.val b) (sigma 1) = 0 | |
| else False)) ↔ _ | |
| rw [sharing_iff_stage_ne_two] | |
| simp only [order_branch_childWeight, nativeBranchDesignated, | |
| AllFieldNativeCapacity.designated] | |
| fin_cases side | |
| · exact False.elim (hside rfl) | |
| · simp | |
| · simp | |
| end MatrixMultiplication.AllFieldGroupBranchDesignation | |
| end | |
| end OAI | |