Download data/lean/OAI/Probability/RandomSAT/Model.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 1.74 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/RandomSAT/Model.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/RandomSAT/Model.lean
-
curl -L -o Model.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/RandomSAT/Model.lean
1.74 kB
| import Mathlib | |
| namespace OAI | |
| /-! | |
| Proper clauses choose distinct variables with independent fair signs. Formulas are | |
| independent clause draws with replacement, and their satisfiability probability is | |
| the literal finite cardinality ratio. The empty formula is satisfiable. When | |
| there are fewer variables than literals, nonempty formula lengths have probability | |
| zero by the convention that division by zero is zero. | |
| The threshold assertion concerns fixed clause size and fixed density only, with | |
| no assertion at the critical density. | |
| -/ | |
| namespace FixedClauseThreshold | |
| abbrev Assignment (n : β) := Fin n β Bool | |
| abbrev ProperClause (n k : β) := | |
| { C : Fin n β Option Bool // (Finset.univ.filter fun i => (C i).isSome).card = k } | |
| abbrev Formula (n k m : β) := Fin m β ProperClause n k | |
| def SatisfiesClause {n k : β} (Ο : Assignment n) (C : ProperClause n k) : Prop := | |
| β i : Fin n, C.val i = some (Ο i) | |
| def Satisfies {n k m : β} (Ο : Assignment n) (F : Formula n k m) : Prop := | |
| β j, SatisfiesClause Ο (F j) | |
| def Satisfiable {n k m : β} (F : Formula n k m) : Prop := | |
| β Ο : Assignment n, Satisfies Ο F | |
| noncomputable def properSATProbability (n k m : β) : β := by | |
| classical | |
| exact (Fintype.card { F : Formula n k m // Satisfiable F } : β) / | |
| (Fintype.card (Formula n k m) : β) | |
| def HasLimitingThreshold (k : β) : Prop := | |
| β Ξ± : β, 0 < Ξ± β§ | |
| (β c : β, 0 β€ c β c < Ξ± β | |
| Filter.Tendsto (fun n : β => properSATProbability n k βc * (n : β)ββ) | |
| Filter.atTop (nhds 1)) β§ | |
| (β c : β, Ξ± < c β | |
| Filter.Tendsto (fun n : β => properSATProbability n k βc * (n : β)ββ) | |
| Filter.atTop (nhds 0)) | |
| end FixedClauseThreshold | |
| end OAI | |