Download lean/OAI/Combinatorics/BalancedRyser/Hypergraph.lean from roseking/openAI-math-dataset: direct link, hf CLI and curl.
- Browser
- Download file 975 Bytes
-
https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/Combinatorics/BalancedRyser/Hypergraph.lean
- Command line
-
hf download hf://datasets/roseking/openAI-math-dataset/lean/OAI/Combinatorics/BalancedRyser/Hypergraph.lean
-
curl -L -o Hypergraph.lean https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/Combinatorics/BalancedRyser/Hypergraph.lean
975 Bytes
| import Mathlib.Combinatorics.Hypergraph.Basic | |
| import Mathlib.Data.Finset.Card | |
| import Mathlib.Data.Finset.Pi | |
| import Mathlib.Data.Nat.Prime.Defs | |
| import OAI.Combinatorics.BalancedRyser.Model | |
| namespace OAI | |
| namespace Balanced | |
| open scoped _root_.Balanced | |
| namespace PartiteHypergraph | |
| variable {r n : ℕ} | |
| def part (i : Fin r) : Finset (Vertex r n) := | |
| Finset.univ.image (fun v : Fin n => (i, v)) | |
| def edgeVertices (e : Fin r → Fin n) : Finset (Vertex r n) := | |
| Finset.univ.image (fun i : Fin r => (i, e i)) | |
| def toHypergraph (H : PartiteHypergraph r n) : Hypergraph (Vertex r n) where | |
| vertexSet := Set.univ | |
| edgeSet := {E | ∃ e ∈ H.edges, E = ↑(edgeVertices e)} | |
| subset_vertexSet_of_mem_edgeSet' := fun _ _ => Set.subset_univ _ | |
| def IsMatching (H : PartiteHypergraph r n) (M : Finset (Fin r → Fin n)) : Prop := | |
| M ⊆ H.edges ∧ | |
| ∀ e ∈ M, ∀ f ∈ M, e ≠ f → Disjoint (edgeVertices e) (edgeVertices f) | |
| end PartiteHypergraph | |
| end Balanced | |
| end OAI | |