Download lean/OAI/Combinatorics/MatchingCount/Algorithm/RationalCounts.lean from roseking/openAI-math-dataset: direct link, hf CLI and curl.
- Browser
- Download file 728 Bytes
-
https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/Combinatorics/MatchingCount/Algorithm/RationalCounts.lean
- Command line
-
hf download hf://datasets/roseking/openAI-math-dataset/lean/OAI/Combinatorics/MatchingCount/Algorithm/RationalCounts.lean
-
curl -L -o RationalCounts.lean https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/Combinatorics/MatchingCount/Algorithm/RationalCounts.lean
728 Bytes
| import Mathlib | |
| import OAI.Combinatorics.MatchingCount.Algorithm.RationalEstimator | |
| namespace OAI | |
| namespace MatchingFPRAS.FiniteTrial | |
| variable {G : GraphInput} [Nontrivial (Fin G.n)] | |
| def sampleCount (p : Trial.Parameters G) : ℕ := | |
| ⌈10*(Counting.sigma (sourceD (G:=G) p.K) p.K p.epsilon)⁻¹^2*((G.n:ℚ)+p.K+1)⌉₊ | |
| omit [Nontrivial (Fin G.n)] in | |
| lemma sampleCount_eq (p : Trial.Parameters G) : sampleCount p=p.S := by | |
| unfold sampleCount Trial.Parameters.S Enlargement.stageSampleCount | |
| apply Nat.ceil_congr | |
| intro s | |
| unfold Trial.Parameters.D | |
| rw [←sourceD_eq (G:=G)] | |
| have hh:=Counting.sigma_cast (sourceD (G:=G) p.K) p.K p.epsilon | |
| rw [←hh] | |
| exact_mod_cast Iff.rfl | |
| end MatchingFPRAS.FiniteTrial | |
| end OAI | |