task_id stringlengths 21 23 | challenge_id stringlengths 16 16 | proof_assistant stringclasses 1
value | session stringclasses 1
value | repo stringclasses 57
values | revision stringclasses 57
values | file_path stringlengths 13 92 | theory stringlengths 1 48 | variant int64 0 132 | challenge_type stringclasses 1
value | difficulty null | count null | by_centrality bool 1
class | ablation_prob float64 0.5 0.5 | min_depth int64 1 1 | max_depth int64 1 1 | leaves_only bool 1
class | min_size int64 0 0 | max_size stringclasses 1
value | min_centrality int64 0 0 | max_centrality stringclasses 1
value | seed int64 42 42 | n_proofs int64 1 173 | n_ablated int64 1 60 | holes_filled listlengths 1 60 | deleted_lemmas listlengths 1 1 | corollaries listlengths 1 1 | closure_size int64 1 172 | challenge_file_content stringlengths 133 350k | solution_file_content stringlengths 394 351k | solution_diff stringlengths 243 134k | manifest dict |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ablate_66df07ebb69a_1 | 3667e4a6989d7ab5 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Computability/Languages/Congruences/BuchiCongruence.lean | BuchiCongruence | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 3 | 1 | [
{
"theorem_name": "buchiFamily_saturation",
"depth": 1,
"n_commands": 0,
"n_lines": 51,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rintro ⟨a, b⟩ ⟨xs, h_xs, h_lang⟩ ys h_ys\n obtain ⟨xl, xls, h_xl_c, h_xls_c, rfl⟩ := mem_buchiFamily.mp h_xs\n ob... | [
{
"name": "frequently_via_accept",
"text": "private lemma frequently_via_accept [Inhabited Symbol]\n {xl : List Symbol} {xls : ωSequence (List Symbol)} {ss : ωSequence State}\n (h_acc : ∃ᶠ (k : ℕ) in atTop, ss k ∈ na.accept)\n (h_exec : na.OmegaExecution ss (xl ++ω xls.flatten))\n (h_xls_p : ∀ (... | [
{
"name": "buchiFamily_saturation",
"fan_in": 0,
"n_deps_direct": 3,
"n_deps_transitive": 3,
"n_lines": 55,
"n_chars": 2937,
"n_subproofs": 31,
"n_tactics": 51,
"cyclomatic": 2,
"n_automation": 15,
"n_rewrites": 0,
"n_structural": 14,
"automation_only": false,
... | 2 | /-
Copyright (c) 2026 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Automata.NA.Pair
public import Cslib.Foundations.Combinatorics.InfiniteGraphRamsey
public import Cslib.Foundations.Data.S... | /-
Copyright (c) 2026 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Automata.NA.Pair
public import Cslib.Foundations.Combinatorics.InfiniteGraphRamsey
public import Cslib.Foundations.Data.S... | @@ -152,9 +152,84 @@
-- This intermediate result is split out of the proof of `buchiCongruence_saturation` below
-- because that proof was too big and kept exceeding the default `maxHeartbeats`.
+private lemma frequently_via_accept [Inhabited Symbol]
+ {xl : List Symbol} {xls : ωSequence (List Symbol)} {ss : ωSe... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_a7106f5f52af_0 | e397b9bbe9415a1c | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Foundations/Control/Monad/Free/Effects.lean | Effects | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 2 | 1 | [
{
"theorem_name": "run'_toStateM",
"depth": 1,
"n_commands": 0,
"n_lines": 3,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rw [run', StateT.run'_eq, run_toStateM]\n rfl",
"n_chars": 51,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic... | [
{
"name": "run_toStateM",
"text": "/--\nThe canonical interpreter `toStateM` derived from `liftM` agrees with the hand-written\nrecursive interpreter `run` for `FreeState`.\n-/\n@[simp]\ntheorem run_toStateM {α : Type u} (comp : FreeState σ α) (s₀ : σ) :\n (toStateM comp).run s₀ = pure (run comp s₀) := b... | [
{
"name": "run'_toStateM",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 6,
"n_chars": 184,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 0,
"automation_only": false,
"max_nesting":... | 1 | /-
Copyright (c) 2025 Tanner Duve. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Tanner Duve
-/
module
public import Cslib.Foundations.Control.Monad.Free
public import Mathlib.Control.Monad.Cont
/-!
# Free Monad
This file defines several canonical instances on the... | /-
Copyright (c) 2025 Tanner Duve. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Tanner Duve
-/
module
public import Cslib.Foundations.Control.Monad.Free
public import Mathlib.Control.Monad.Cont
/-!
# Free Monad
This file defines several canonical instances on the... | @@ -92,7 +92,19 @@
| .liftBind StateF.get k => run (k s₀) s₀
| .liftBind (StateF.set s') k => run (k PUnit.unit) s'
+/--
+The canonical interpreter `toStateM` derived from `liftM` agrees with the hand-written
+recursive interpreter `run` for `FreeState`.
+-/
@[simp]
+theorem run_toStateM {α : Type u} (comp : F... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_a7106f5f52af_1 | ec626c2a9e43a9b1 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Foundations/Control/Monad/Free/Effects.lean | Effects | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 2 | 1 | [
{
"theorem_name": "run_bind",
"depth": 1,
"n_commands": 0,
"n_lines": 3,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rw [← Id.run_pure (run _ _), ← run_toReaderM, toReaderM, liftM_bind, ReaderT.run_bind,\n Id.run_bind, run_toReaderM, run_toRead... | [
{
"name": "run_toReaderM",
"text": "/--\nThe canonical interpreter `toReaderM` derived from `liftM` agrees with the hand-written\nrecursive interpreter `run` for `FreeReader` -/\n@[simp]\ntheorem run_toReaderM {α : Type u} (comp : FreeReader σ α) (s : σ) :\n (toReaderM comp).run s = pure (run comp s) := ... | [
{
"name": "run_bind",
"fan_in": 3,
"n_deps_direct": 6,
"n_deps_transitive": 3,
"n_lines": 7,
"n_chars": 315,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 1,
"n_structural": 0,
"automation_only": false,
"max_nesting": 4
... | 1 | /-
Copyright (c) 2025 Tanner Duve. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Tanner Duve
-/
module
public import Cslib.Foundations.Control.Monad.Free
public import Mathlib.Control.Monad.Cont
/-!
# Free Monad
This file defines several canonical instances on the... | /-
Copyright (c) 2025 Tanner Duve. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Tanner Duve
-/
module
public import Cslib.Foundations.Control.Monad.Free
public import Mathlib.Control.Monad.Cont
/-!
# Free Monad
This file defines several canonical instances on the... | @@ -387,7 +387,18 @@
| .pure a => a
| .liftBind ReaderF.read a => run (a s₀) s₀
+/--
+The canonical interpreter `toReaderM` derived from `liftM` agrees with the hand-written
+recursive interpreter `run` for `FreeReader` -/
@[simp]
+theorem run_toReaderM {α : Type u} (comp : FreeReader σ α) (s : σ) :
+ (toRe... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_ee67f99aa391_0 | 3612847bf07751df | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Languages/CCS/BehaviouralTheory.lean | BehaviouralTheory | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 4 | 1 | [
{
"theorem_name": "bisimilarity_is_congruence",
"depth": 1,
"n_commands": 0,
"n_lines": 14,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n induction c with\n | parR r c _ =>\n calc\n _ ~[lts (defs := defs)] (c.fill p |>.par r) := by grind\n... | [
{
"name": "bisimilarity_congr_pre",
"text": "/-- P ~ Q → μ.P ~ μ.Q -/\ntheorem bisimilarity_congr_pre :\n (p ~[lts (defs := defs)] q) → (pre μ p) ~[lts (defs := defs)] (pre μ q) := by\n intro hpq\n exists @PreBisim _ _ defs\n constructor\n · grind\n intro s1 s2 hr μ'\n cases hr\n case pre p' q' μ ... | [
{
"name": "bisimilarity_is_congruence",
"fan_in": 0,
"n_deps_direct": 4,
"n_deps_transitive": 4,
"n_lines": 19,
"n_chars": 931,
"n_subproofs": 0,
"n_tactics": 14,
"cyclomatic": 2,
"n_automation": 7,
"n_rewrites": 0,
"n_structural": 3,
"automation_only": false,
... | 4 | /-
Copyright (c) 2025 Fabrizio Montesi. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Fabrizio Montesi
-/
module
public import Cslib.Foundations.Semantics.LTS.Bisimulation
public import Cslib.Foundations.Syntax.Congruence
public import Cslib.Languages.CCS.Semantics
... | /-
Copyright (c) 2025 Fabrizio Montesi. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Fabrizio Montesi
-/
module
public import Cslib.Foundations.Semantics.LTS.Bisimulation
public import Cslib.Foundations.Syntax.Congruence
public import Cslib.Languages.CCS.Semantics
... | @@ -130,6 +130,20 @@
| pre : (p ~[lts (defs := defs)] q) → PreBisim (pre μ p) (pre μ q)
| bisim : (p ~[lts (defs := defs)] q) → PreBisim p q
+/-- P ~ Q → μ.P ~ μ.Q -/
+theorem bisimilarity_congr_pre :
+ (p ~[lts (defs := defs)] q) → (pre μ p) ~[lts (defs := defs)] (pre μ q) := by
+ intro hpq
+ exists @PreBisim... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_af907e21cc29_0 | 800e42e48208a81d | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | CslibTests/FreeMonad.lean | FreeMonad | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 1 | 1 | [
{
"theorem_name": "runEff_eval_correct",
"depth": 1,
"n_commands": 0,
"n_lines": 37,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n induction h\n · case val z env trace =>\n simp [eval, runEff, effPure]\n · case var_found x env trace v h =>\n ... | [
{
"name": "runEff_bind_ok",
"text": "/-- Lemma: bind behavior when the first computation succeeds.\n\nIf running program `p` succeeds with result `v`, environment `env'`, and trace `tr'`,\nthen running `p >>= k` is equivalent to running `k v` with the updated state.\n\nThis captures the expected sequential ... | [
{
"name": "runEff_eval_correct",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 50,
"n_chars": 2432,
"n_subproofs": 6,
"n_tactics": 48,
"cyclomatic": 2,
"n_automation": 22,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": false,
"max... | 1 | /-
Copyright (c) 2025 Tanner Duve. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Tanner Duve
-/
import Cslib.Foundations.Control.Monad.Free
import Mathlib.Tactic.Cases
import Cslib.Foundations.Control.Monad.Free.Fold
import Cslib.Languages.LambdaCalculus.LocallyNamele... | /-
Copyright (c) 2025 Tanner Duve. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Tanner Duve
-/
import Cslib.Foundations.Control.Monad.Free
import Mathlib.Tactic.Cases
import Cslib.Foundations.Control.Monad.Free.Fold
import Cslib.Languages.LambdaCalculus.LocallyNamele... | @@ -252,6 +252,28 @@
else
pure (v1 / v2)
+/-- Lemma: bind behavior when the first computation succeeds.
+
+If running program `p` succeeds with result `v`, environment `env'`, and trace `tr'`,
+then running `p >>= k` is equivalent to running `k v` with the updated state.
+
+This captures the expected ... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_6f74b5eac568_0 | cdfbf97941a2d5e0 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Languages/CombinatoryLogic/Basic.lean | Basic | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 1 | [
{
"theorem_name": "B_tail_mred",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": "\n Trans.trans (B_def f g x) (MRed.tail f h)",
"n_chars": 44,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
... | [
{
"name": "B_def",
"text": "theorem B_def (f g x : SKI) : (B ⬝ f ⬝ g ⬝ x) ↠ f ⬝ (g ⬝ x) :=\n BPoly.toSKI_correct [f, g, x] (by simp)\n\n",
"fan_in": 1,
"n_lines": 4,
"n_chars": 118,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n... | [
{
"name": "B_tail_mred",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 5,
"n_chars": 176,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,
"max_nesting": 2... | 1 | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring
-/
module
public import Cslib.Languages.CombinatoryLogic.Defs
/-!
# Basic results for the SKI calculus
## Main definition
- `Polynomial`: the type of SKI terms with f... | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring
-/
module
public import Cslib.Languages.CombinatoryLogic.Defs
/-!
# Basic results for the SKI calculus
## Main definition
- `Polynomial`: the type of SKI terms with f... | @@ -168,8 +168,12 @@
def BPoly : SKI.Polynomial 3 := &0 ⬝' (&1 ⬝' &2)
/-- A SKI term representing B -/
def B : SKI := BPoly.toSKI
+theorem B_def (f g x : SKI) : (B ⬝ f ⬝ g ⬝ x) ↠ f ⬝ (g ⬝ x) :=
+ BPoly.toSKI_correct [f, g, x] (by simp)
+
/-- B followed by tail reduction -/
-lemma B_tail_mred (f g x y : SKI) (h : (... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_6f74b5eac568_1 | e78a7c26cb58e57f | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Languages/CombinatoryLogic/Basic.lean | Basic | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 1 | [
{
"theorem_name": "C_head_mred",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": "\n Trans.trans (C_def f x y) (MRed.head x h)",
"n_chars": 44,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
... | [
{
"name": "C_def",
"text": "theorem C_def (f x y : SKI) : (C ⬝ f ⬝ x ⬝ y) ↠ f ⬝ y ⬝ x :=\n CPoly.toSKI_correct [f, x, y] (by simp)\n\n",
"fan_in": 1,
"n_lines": 4,
"n_chars": 116,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_s... | [
{
"name": "C_head_mred",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 5,
"n_chars": 176,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,
"max_nesting": 2... | 1 | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring
-/
module
public import Cslib.Languages.CombinatoryLogic.Defs
/-!
# Basic results for the SKI calculus
## Main definition
- `Polynomial`: the type of SKI terms with f... | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring
-/
module
public import Cslib.Languages.CombinatoryLogic.Defs
/-!
# Basic results for the SKI calculus
## Main definition
- `Polynomial`: the type of SKI terms with f... | @@ -172,8 +172,12 @@
def CPoly : SKI.Polynomial 3 := &0 ⬝' &2 ⬝' &1
/-- A SKI term representing C -/
def C : SKI := CPoly.toSKI
+theorem C_def (f x y : SKI) : (C ⬝ f ⬝ x ⬝ y) ↠ f ⬝ y ⬝ x :=
+ CPoly.toSKI_correct [f, x, y] (by simp)
+
/-- C followed by head reduction -/
-lemma C_head_mred (f x y z : SKI) (h : (f ⬝ ... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_6f74b5eac568_2 | fcb9611a30dbbcaa | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Languages/CombinatoryLogic/Basic.lean | Basic | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 2 | [
{
"theorem_name": "Y_correct",
"depth": 1,
"n_commands": 0,
"n_lines": 6,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n use f ⬝ (H ⬝ f ⬝ (H ⬝ f))\n constructor\n · exact Trans.trans (Y_def f) (H_def f (H ⬝ f))\n · apply MRed.tail\n exact Y_def... | [
{
"name": "H_def",
"text": "theorem H_def (f x : SKI) : (H ⬝ f ⬝ x) ↠ f ⬝ (x ⬝ x) :=\n HPoly.toSKI_correct [f, x] (by simp)\n\n",
"fan_in": 2,
"n_lines": 4,
"n_chars": 107,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structur... | [
{
"name": "Y_correct",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 9,
"n_chars": 269,
"n_subproofs": 0,
"n_tactics": 6,
"cyclomatic": 2,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 5,
"automation_only": false,
"max_nesting": 4
... | 2 | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring
-/
module
public import Cslib.Languages.CombinatoryLogic.Defs
/-!
# Basic results for the SKI calculus
## Main definition
- `Polynomial`: the type of SKI terms with f... | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring
-/
module
public import Cslib.Languages.CombinatoryLogic.Defs
/-!
# Basic results for the SKI calculus
## Main definition
- `Polynomial`: the type of SKI terms with f... | @@ -191,6 +191,9 @@
def HPoly : SKI.Polynomial 2 := &0 ⬝' (&1 ⬝' &1)
/-- A SKI term representing H -/
def H : SKI := HPoly.toSKI
+theorem H_def (f x : SKI) : (H ⬝ f ⬝ x) ↠ f ⬝ (x ⬝ x) :=
+ HPoly.toSKI_correct [f, x] (by simp)
+
/-- Curry's fixed-point combinator: Y := λ f. H f (H f) -/
def YPoly : SKI.Polynomial ... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_6f74b5eac568_3 | b453dfbf6e9f1585 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Languages/CombinatoryLogic/Basic.lean | Basic | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 2 | [
{
"theorem_name": "Y_correct",
"depth": 1,
"n_commands": 0,
"n_lines": 6,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n use f ⬝ (H ⬝ f ⬝ (H ⬝ f))\n constructor\n · exact Trans.trans (Y_def f) (H_def f (H ⬝ f))\n · apply MRed.tail\n exact Y_def... | [
{
"name": "H_def",
"text": "theorem H_def (f x : SKI) : (H ⬝ f ⬝ x) ↠ f ⬝ (x ⬝ x) :=\n HPoly.toSKI_correct [f, x] (by simp)\n\n",
"fan_in": 2,
"n_lines": 4,
"n_chars": 107,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structur... | [
{
"name": "fixedPoint_correct",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 3,
"n_chars": 97,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,
"max_nesti... | 1 | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring
-/
module
public import Cslib.Languages.CombinatoryLogic.Defs
/-!
# Basic results for the SKI calculus
## Main definition
- `Polynomial`: the type of SKI terms with f... | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring
-/
module
public import Cslib.Languages.CombinatoryLogic.Defs
/-!
# Basic results for the SKI calculus
## Main definition
- `Polynomial`: the type of SKI terms with f... | @@ -191,6 +191,9 @@
def HPoly : SKI.Polynomial 2 := &0 ⬝' (&1 ⬝' &1)
/-- A SKI term representing H -/
def H : SKI := HPoly.toSKI
+theorem H_def (f x : SKI) : (H ⬝ f ⬝ x) ↠ f ⬝ (x ⬝ x) :=
+ HPoly.toSKI_correct [f, x] (by simp)
+
/-- Curry's fixed-point combinator: Y := λ f. H f (H f) -/
def YPoly : SKI.Polynomial ... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_6f74b5eac568_4 | 9d772e5ef26ea7bc | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Languages/CombinatoryLogic/Basic.lean | Basic | 4 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 1 | [
{
"theorem_name": "Th_correct",
"depth": 1,
"n_commands": 0,
"n_lines": 1,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " ThAux_def ThAux f",
"n_chars": 18,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
"n_automation": 0,
"n_re... | [
{
"name": "ThAux_def",
"text": "theorem ThAux_def (x y : SKI) : (ThAux ⬝ x ⬝ y) ↠ y ⬝ (x ⬝ x ⬝ y) :=\n ThAuxPoly.toSKI_correct [x, y] (by simp)\n\n",
"fan_in": 1,
"n_lines": 4,
"n_chars": 125,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites"... | [
{
"name": "Th_correct",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 6,
"n_chars": 147,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,
"max_nesting": 1
... | 1 | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring
-/
module
public import Cslib.Languages.CombinatoryLogic.Defs
/-!
# Basic results for the SKI calculus
## Main definition
- `Polynomial`: the type of SKI terms with f... | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring
-/
module
public import Cslib.Languages.CombinatoryLogic.Defs
/-!
# Basic results for the SKI calculus
## Main definition
- `Polynomial`: the type of SKI terms with f... | @@ -205,10 +205,13 @@
def ThAuxPoly : SKI.Polynomial 2 := &1 ⬝' (&0 ⬝' &0 ⬝' &1)
/-- A term representing ΘAux -/
def ThAux : SKI := ThAuxPoly.toSKI
+theorem ThAux_def (x y : SKI) : (ThAux ⬝ x ⬝ y) ↠ y ⬝ (x ⬝ x ⬝ y) :=
+ ThAuxPoly.toSKI_correct [x, y] (by simp)
+
/-- Turing's fixed-point combinator: Θ := (λ x y. y ... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_6f74b5eac568_5 | b38914d3aad9c46d | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Languages/CombinatoryLogic/Basic.lean | Basic | 5 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 1 | [
{
"theorem_name": "cond_correct",
"depth": 1,
"n_commands": 0,
"n_lines": 4,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n trans a ⬝ x ⬝ y\n · exact rotR_def x y a\n · exact h x y",
"n_chars": 68,
"n_subproofs": 0,
"n_tactics": 4,
... | [
{
"name": "rotR_def",
"text": "theorem rotR_def (x y z : SKI) : (RotR ⬝ x ⬝ y ⬝ z) ↠ z ⬝ x ⬝ y :=\n RotRPoly.toSKI_correct [x, y, z] (by simp)\n\n",
"fan_in": 1,
"n_lines": 4,
"n_chars": 125,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites":... | [
{
"name": "cond_correct",
"fan_in": 5,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 7,
"n_chars": 193,
"n_subproofs": 0,
"n_tactics": 4,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 2,
"automation_only": false,
"max_nesting": ... | 1 | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring
-/
module
public import Cslib.Languages.CombinatoryLogic.Defs
/-!
# Basic results for the SKI calculus
## Main definition
- `Polynomial`: the type of SKI terms with f... | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring
-/
module
public import Cslib.Languages.CombinatoryLogic.Defs
/-!
# Basic results for the SKI calculus
## Main definition
- `Polynomial`: the type of SKI terms with f... | @@ -176,6 +176,9 @@
def RotRPoly : SKI.Polynomial 3 := &2 ⬝' &0 ⬝' &1
/-- A SKI term representing RotR -/
def RotR : SKI := RotRPoly.toSKI
+theorem rotR_def (x y z : SKI) : (RotR ⬝ x ⬝ y ⬝ z) ↠ z ⬝ x ⬝ y :=
+ RotRPoly.toSKI_correct [x, y, z] (by simp)
+
/-- Rotate left: RotR := λ x y z. y z x -/
def RotLPoly : SK... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_6f74b5eac568_6 | 75fe189efc1e92ab | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Languages/CombinatoryLogic/Basic.lean | Basic | 6 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 3 | [
{
"theorem_name": "neg_correct",
"depth": 1,
"n_commands": 0,
"n_lines": 6,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n apply isBool_trans (a' := if ua then FF else TT)\n · apply cond_correct (h := h)\n · cases ua\n · simp [TT_correct]\n ·... | [
{
"name": "isBool_trans",
"text": "theorem isBool_trans (u : Bool) (a a' : SKI) (h : a ↠ a') (ha' : IsBool u a') :\n IsBool u a := by\n intro x y\n trans a' ⬝ x ⬝ y\n · apply MRed.head\n apply MRed.head\n exact h\n · exact ha' x y\n\n",
"fan_in": 3,
"n_lines": 10,
"n_chars": 211,
... | [
{
"name": "neg_correct",
"fan_in": 0,
"n_deps_direct": 4,
"n_deps_transitive": 5,
"n_lines": 8,
"n_chars": 248,
"n_subproofs": 0,
"n_tactics": 6,
"cyclomatic": 2,
"n_automation": 2,
"n_rewrites": 0,
"n_structural": 3,
"automation_only": false,
"max_nesting": 4... | 3 | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring
-/
module
public import Cslib.Languages.CombinatoryLogic.Defs
/-!
# Basic results for the SKI calculus
## Main definition
- `Polynomial`: the type of SKI terms with f... | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring
-/
module
public import Cslib.Languages.CombinatoryLogic.Defs
/-!
# Basic results for the SKI calculus
## Main definition
- `Polynomial`: the type of SKI terms with f... | @@ -211,6 +211,15 @@
def IsBool (u : Bool) (a : SKI) : Prop :=
∀ x y : SKI, (a ⬝ x ⬝ y) ↠ (if u then x else y)
+theorem isBool_trans (u : Bool) (a a' : SKI) (h : a ↠ a') (ha' : IsBool u a') :
+ IsBool u a := by
+ intro x y
+ trans a' ⬝ x ⬝ y
+ · apply MRed.head
+ apply MRed.head
+ exact h
+ · exact h... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_6f74b5eac568_7 | 14cfca8b4d50f959 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Languages/CombinatoryLogic/Basic.lean | Basic | 7 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 5 | [
{
"theorem_name": "neg_correct",
"depth": 1,
"n_commands": 0,
"n_lines": 6,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n apply isBool_trans (a' := if ua then FF else TT)\n · apply cond_correct (h := h)\n · cases ua\n · simp [TT_correct]\n ·... | [
{
"name": "cond_correct",
"text": "theorem cond_correct (a x y : SKI) (u : Bool) (h : IsBool u a) :\n (SKI.Cond ⬝ x ⬝ y ⬝ a) ↠ if u then x else y := by\n trans a ⬝ x ⬝ y\n · exact rotR_def x y a\n · exact h x y\n\n",
"fan_in": 5,
"n_lines": 7,
"n_chars": 193,
"n_subproofs": 0,
"n_t... | [
{
"name": "and_correct",
"fan_in": 0,
"n_deps_direct": 5,
"n_deps_transitive": 6,
"n_lines": 14,
"n_chars": 665,
"n_subproofs": 0,
"n_tactics": 11,
"cyclomatic": 3,
"n_automation": 2,
"n_rewrites": 0,
"n_structural": 6,
"automation_only": false,
"max_nesting":... | 4 | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring
-/
module
public import Cslib.Languages.CombinatoryLogic.Defs
/-!
# Basic results for the SKI calculus
## Main definition
- `Polynomial`: the type of SKI terms with f... | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring
-/
module
public import Cslib.Languages.CombinatoryLogic.Defs
/-!
# Basic results for the SKI calculus
## Main definition
- `Polynomial`: the type of SKI terms with f... | @@ -235,6 +235,12 @@
/-- Conditional: Cond x y b := if b then x else y -/
protected def Cond : SKI := RotR
+theorem cond_correct (a x y : SKI) (u : Bool) (h : IsBool u a) :
+ (SKI.Cond ⬝ x ⬝ y ⬝ a) ↠ if u then x else y := by
+ trans a ⬝ x ⬝ y
+ · exact rotR_def x y a
+ · exact h x y
+
/-- Neg := λ a. Cond FF... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_6f74b5eac568_8 | 6608fedade5ce973 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Languages/CombinatoryLogic/Basic.lean | Basic | 8 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 5 | [
{
"theorem_name": "neg_correct",
"depth": 1,
"n_commands": 0,
"n_lines": 6,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n apply isBool_trans (a' := if ua then FF else TT)\n · apply cond_correct (h := h)\n · cases ua\n · simp [TT_correct]\n ·... | [
{
"name": "cond_correct",
"text": "theorem cond_correct (a x y : SKI) (u : Bool) (h : IsBool u a) :\n (SKI.Cond ⬝ x ⬝ y ⬝ a) ↠ if u then x else y := by\n trans a ⬝ x ⬝ y\n · exact rotR_def x y a\n · exact h x y\n\n",
"fan_in": 5,
"n_lines": 7,
"n_chars": 193,
"n_subproofs": 0,
"n_t... | [
{
"name": "or_correct",
"fan_in": 0,
"n_deps_direct": 5,
"n_deps_transitive": 6,
"n_lines": 18,
"n_chars": 677,
"n_subproofs": 0,
"n_tactics": 11,
"cyclomatic": 3,
"n_automation": 3,
"n_rewrites": 0,
"n_structural": 6,
"automation_only": false,
"max_nesting": ... | 4 | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring
-/
module
public import Cslib.Languages.CombinatoryLogic.Defs
/-!
# Basic results for the SKI calculus
## Main definition
- `Polynomial`: the type of SKI terms with f... | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring
-/
module
public import Cslib.Languages.CombinatoryLogic.Defs
/-!
# Basic results for the SKI calculus
## Main definition
- `Polynomial`: the type of SKI terms with f... | @@ -235,6 +235,12 @@
/-- Conditional: Cond x y b := if b then x else y -/
protected def Cond : SKI := RotR
+theorem cond_correct (a x y : SKI) (u : Bool) (h : IsBool u a) :
+ (SKI.Cond ⬝ x ⬝ y ⬝ a) ↠ if u then x else y := by
+ trans a ⬝ x ⬝ y
+ · exact rotR_def x y a
+ · exact h x y
+
/-- Neg := λ a. Cond FF... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_6f74b5eac568_9 | afe5d960082153fd | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Languages/CombinatoryLogic/Basic.lean | Basic | 9 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 5 | [
{
"theorem_name": "neg_correct",
"depth": 1,
"n_commands": 0,
"n_lines": 6,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n apply isBool_trans (a' := if ua then FF else TT)\n · apply cond_correct (h := h)\n · cases ua\n · simp [TT_correct]\n ·... | [
{
"name": "cond_correct",
"text": "theorem cond_correct (a x y : SKI) (u : Bool) (h : IsBool u a) :\n (SKI.Cond ⬝ x ⬝ y ⬝ a) ↠ if u then x else y := by\n trans a ⬝ x ⬝ y\n · exact rotR_def x y a\n · exact h x y\n\n",
"fan_in": 5,
"n_lines": 7,
"n_chars": 193,
"n_subproofs": 0,
"n_t... | [
{
"name": "fst_correct",
"fan_in": 1,
"n_deps_direct": 3,
"n_deps_transitive": 4,
"n_lines": 6,
"n_chars": 199,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": false,
"max_nesting": 2... | 3 | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring
-/
module
public import Cslib.Languages.CombinatoryLogic.Defs
/-!
# Basic results for the SKI calculus
## Main definition
- `Polynomial`: the type of SKI terms with f... | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring
-/
module
public import Cslib.Languages.CombinatoryLogic.Defs
/-!
# Basic results for the SKI calculus
## Main definition
- `Polynomial`: the type of SKI terms with f... | @@ -226,6 +226,12 @@
/-- Conditional: Cond x y b := if b then x else y -/
protected def Cond : SKI := RotR
+theorem cond_correct (a x y : SKI) (u : Bool) (h : IsBool u a) :
+ (SKI.Cond ⬝ x ⬝ y ⬝ a) ↠ if u then x else y := by
+ trans a ⬝ x ⬝ y
+ · exact rotR_def x y a
+ · exact h x y
+
/-- Neg := λ a. Cond FF... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_6f74b5eac568_10 | 7a3541f47f4e55f7 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Languages/CombinatoryLogic/Basic.lean | Basic | 10 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 5 | [
{
"theorem_name": "neg_correct",
"depth": 1,
"n_commands": 0,
"n_lines": 6,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n apply isBool_trans (a' := if ua then FF else TT)\n · apply cond_correct (h := h)\n · cases ua\n · simp [TT_correct]\n ·... | [
{
"name": "cond_correct",
"text": "theorem cond_correct (a x y : SKI) (u : Bool) (h : IsBool u a) :\n (SKI.Cond ⬝ x ⬝ y ⬝ a) ↠ if u then x else y := by\n trans a ⬝ x ⬝ y\n · exact rotR_def x y a\n · exact h x y\n\n",
"fan_in": 5,
"n_lines": 7,
"n_chars": 193,
"n_subproofs": 0,
"n_t... | [
{
"name": "unpaired_correct",
"fan_in": 0,
"n_deps_direct": 3,
"n_deps_transitive": 8,
"n_lines": 9,
"n_chars": 325,
"n_subproofs": 0,
"n_tactics": 7,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 5,
"automation_only": false,
"max_nestin... | 4 | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring
-/
module
public import Cslib.Languages.CombinatoryLogic.Defs
/-!
# Basic results for the SKI calculus
## Main definition
- `Polynomial`: the type of SKI terms with f... | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring
-/
module
public import Cslib.Languages.CombinatoryLogic.Defs
/-!
# Basic results for the SKI calculus
## Main definition
- `Polynomial`: the type of SKI terms with f... | @@ -226,6 +226,12 @@
/-- Conditional: Cond x y b := if b then x else y -/
protected def Cond : SKI := RotR
+theorem cond_correct (a x y : SKI) (u : Bool) (h : IsBool u a) :
+ (SKI.Cond ⬝ x ⬝ y ⬝ a) ↠ if u then x else y := by
+ trans a ⬝ x ⬝ y
+ · exact rotR_def x y a
+ · exact h x y
+
/-- Neg := λ a. Cond FF... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_0f0a51c46d4d_0 | 34e200b39c2a4f69 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Logics/HML/Basic.lean | Basic | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 8 | 2 | [
{
"theorem_name": "neg_denotation",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n grind [_=_ satisfies_mem_denotation]",
"n_chars": 42,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
... | [
{
"name": "satisfies_mem_denotation",
"text": "/-- Characterisation theorem for the denotational semantics. -/\n@[scoped grind =]\ntheorem satisfies_mem_denotation {lts : LTS State Label} :\n Satisfies lts s a ↔ s ∈ a.denotation lts := by\n induction a generalizing s <;> grind\n\n",
"fan_in": 2,
... | [
{
"name": "neg_denotation",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 8,
"n_chars": 316,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,
"max_nesting":... | 1 | /-
Copyright (c) 2026 Fabrizio Montesi. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Fabrizio Montesi, Marco Peressotti, Alexandre Rademaker
-/
module
public import Cslib.Foundations.Semantics.LTS.Bisimulation
/-! # Hennessy-Milner Logic (HML)
Hennessy-Milner Log... | /-
Copyright (c) 2026 Fabrizio Montesi. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Fabrizio Montesi, Marco Peressotti, Alexandre Rademaker
-/
module
public import Cslib.Foundations.Semantics.LTS.Bisimulation
/-! # Hennessy-Milner Logic (HML)
Hennessy-Milner Log... | @@ -118,6 +118,12 @@
open Proposition LTS
+/-- Characterisation theorem for the denotational semantics. -/
+@[scoped grind =]
+theorem satisfies_mem_denotation {lts : LTS State Label} :
+ Satisfies lts s a ↔ s ∈ a.denotation lts := by
+ induction a generalizing s <;> grind
+
/-- A state satisfies a propositio... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_0f0a51c46d4d_1 | 09dc552951dd8b38 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Logics/HML/Basic.lean | Basic | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 8 | 2 | [
{
"theorem_name": "neg_denotation",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n grind [_=_ satisfies_mem_denotation]",
"n_chars": 42,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
... | [
{
"name": "satisfies_mem_denotation",
"text": "/-- Characterisation theorem for the denotational semantics. -/\n@[scoped grind =]\ntheorem satisfies_mem_denotation {lts : LTS State Label} :\n Satisfies lts s a ↔ s ∈ a.denotation lts := by\n induction a generalizing s <;> grind\n\n",
"fan_in": 2,
... | [
{
"name": "theoryEq_denotation_eq",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 7,
"n_chars": 295,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,
"max_n... | 1 | /-
Copyright (c) 2026 Fabrizio Montesi. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Fabrizio Montesi, Marco Peressotti, Alexandre Rademaker
-/
module
public import Cslib.Foundations.Semantics.LTS.Bisimulation
/-! # Hennessy-Milner Logic (HML)
Hennessy-Milner Log... | /-
Copyright (c) 2026 Fabrizio Montesi. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Fabrizio Montesi, Marco Peressotti, Alexandre Rademaker
-/
module
public import Cslib.Foundations.Semantics.LTS.Bisimulation
/-! # Hennessy-Milner Logic (HML)
Hennessy-Milner Log... | @@ -118,6 +118,12 @@
open Proposition LTS
+/-- Characterisation theorem for the denotational semantics. -/
+@[scoped grind =]
+theorem satisfies_mem_denotation {lts : LTS State Label} :
+ Satisfies lts s a ↔ s ∈ a.denotation lts := by
+ induction a generalizing s <;> grind
+
/-- A state satisfies a propositio... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_0f0a51c46d4d_4 | 5effe97edd1f74d7 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Logics/HML/Basic.lean | Basic | 4 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 8 | 1 | [
{
"theorem_name": "theoryEq_isBisimulation",
"depth": 1,
"n_commands": 0,
"n_lines": 31,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro s1 s2 h μ\n let (s : State) := @Fintype.ofFinite (lts.image s μ) (image_finite s μ)\n constructor\n case ... | [
{
"name": "propositions_satisfies_conjunction",
"text": "theorem propositions_satisfies_conjunction (htr : lts.Tr s1 μ s1')\n (hdist_spec : ∀ s2', Satisfies lts s1' (stateMap s2')) :\n Satisfies lts s1 (.diamond μ <| Proposition.finiteAnd (propositions stateMap)) := by\n apply Satisfies.diamond htr\n... | [
{
"name": "theoryEq_isBisimulation",
"fan_in": 0,
"n_deps_direct": 4,
"n_deps_transitive": 6,
"n_lines": 37,
"n_chars": 1609,
"n_subproofs": 4,
"n_tactics": 30,
"cyclomatic": 4,
"n_automation": 6,
"n_rewrites": 0,
"n_structural": 10,
"automation_only": false,
... | 6 | /-
Copyright (c) 2026 Fabrizio Montesi. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Fabrizio Montesi, Marco Peressotti, Alexandre Rademaker
-/
module
public import Cslib.Foundations.Semantics.LTS.Bisimulation
/-! # Hennessy-Milner Logic (HML)
Hennessy-Milner Log... | /-
Copyright (c) 2026 Fabrizio Montesi. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Fabrizio Montesi, Marco Peressotti, Alexandre Rademaker
-/
module
public import Cslib.Foundations.Semantics.LTS.Bisimulation
/-! # Hennessy-Milner Logic (HML)
Hennessy-Milner Log... | @@ -181,6 +181,14 @@
apply List.mem_map.mpr
use s', Finset.mem_toList.mpr (Fintype.complete s')
+theorem propositions_satisfies_conjunction (htr : lts.Tr s1 μ s1')
+ (hdist_spec : ∀ s2', Satisfies lts s1' (stateMap s2')) :
+ Satisfies lts s1 (.diamond μ <| Proposition.finiteAnd (propositions stateMap)) :=... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_0f0a51c46d4d_5 | 68da229cc2b7aa07 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Logics/HML/Basic.lean | Basic | 5 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 8 | 1 | [
{
"theorem_name": "theoryEq_eq_bisimilarity",
"depth": 1,
"n_commands": 0,
"n_lines": 8,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n ext s1 s2\n apply Iff.intro <;> intro h\n · exists TheoryEq lts\n grind\n · obtain ⟨r, hr, hrb⟩ := h\n ap... | [
{
"name": "bisimulation_TheoryEq",
"text": "lemma bisimulation_TheoryEq {lts : LTS State Label}\n {hrb : lts.IsHomBisimulation r}\n (hr : r s1 s2) :\n TheoryEq lts s1 s2 := by\n have : s2 ~[lts] s1 := by grind [Bisimilarity.symm]\n grind\n\n",
"fan_in": 1,
"n_lines": 8,
"n_chars": 201... | [
{
"name": "theoryEq_eq_bisimilarity",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 13,
"n_chars": 395,
"n_subproofs": 1,
"n_tactics": 9,
"cyclomatic": 2,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 7,
"automation_only": false,
"m... | 1 | /-
Copyright (c) 2026 Fabrizio Montesi. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Fabrizio Montesi, Marco Peressotti, Alexandre Rademaker
-/
module
public import Cslib.Foundations.Semantics.LTS.Bisimulation
/-! # Hennessy-Milner Logic (HML)
Hennessy-Milner Log... | /-
Copyright (c) 2026 Fabrizio Montesi. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Fabrizio Montesi, Marco Peressotti, Alexandre Rademaker
-/
module
public import Cslib.Foundations.Semantics.LTS.Bisimulation
/-! # Hennessy-Milner Logic (HML)
Hennessy-Milner Log... | @@ -238,6 +238,13 @@
| diamond => cases hs with | diamond htr _ => grind [hrb.follow_fst hr htr]
| _ => grind [IsBisimulation]
+lemma bisimulation_TheoryEq {lts : LTS State Label}
+ {hrb : lts.IsHomBisimulation r}
+ (hr : r s1 s2) :
+ TheoryEq lts s1 s2 := by
+ have : s2 ~[lts] s1 := by grind [Bisimil... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_2bfe432c42d5_1 | 6c2a59be310a8a9e | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Languages/LambdaCalculus/LocallyNameless/Untyped/FullBetaConfluence.lean | FullBetaConfluence | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 5 | 1 | [
{
"theorem_name": "para_diamond",
"depth": 1,
"n_commands": 0,
"n_lines": 61,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intros t t1 t2 tpt1\n revert t2\n induction tpt1 <;> intros t2 tpt2\n case fvar x => exact ⟨t2, by grind⟩\n case abs s1 s... | [
{
"name": "para_open_out",
"text": "/-- Parallel substitution respects fresh opening. -/\nlemma para_open_out (L : Finset Var) (mem : ∀ x, x ∉ L → (M ^ fvar x) ⭢ₚ N ^ fvar x)\n (para : M' ⭢ₚ N') : (M ^ M') ⭢ₚ (N ^ N') := by\n grind [fresh_exists <| free_union [fv] Var]\n\n-- TODO: the Takahashi translat... | [
{
"name": "para_diamond",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 64,
"n_chars": 2639,
"n_subproofs": 17,
"n_tactics": 66,
"cyclomatic": 17,
"n_automation": 11,
"n_rewrites": 0,
"n_structural": 23,
"automation_only": false,
"max_nes... | 1 | /-
Copyright (c) 2025 Chris Henson. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Henson
-/
module
public import Cslib.Languages.LambdaCalculus.LocallyNameless.Untyped.FullBeta
public import Cslib.Foundations.Relation.Confluence
/-! # β-confluence for the λ-c... | /-
Copyright (c) 2025 Chris Henson. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Henson
-/
module
public import Cslib.Languages.LambdaCalculus.LocallyNameless.Untyped.FullBeta
public import Cslib.Foundations.Relation.Confluence
/-! # β-confluence for the λ-c... | @@ -122,8 +122,77 @@
| abs => grind [Parallel.abs (free_union Var)]
| _ => grind
+/-- Parallel substitution respects fresh opening. -/
+lemma para_open_out (L : Finset Var) (mem : ∀ x, x ∉ L → (M ^ fvar x) ⭢ₚ N ^ fvar x)
+ (para : M' ⭢ₚ N') : (M ^ M') ⭢ₚ (N ^ N') := by
+ grind [fresh_exists <| free_union [f... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_19bc54eafde8_0 | 056c064e22ba5365 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Algorithms/Lean/MergeSort/MergeSort.lean | MergeSort | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 9 | 1 | [
{
"theorem_name": "mergeSort_sorted",
"depth": 1,
"n_commands": 0,
"n_lines": 5,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n fun_induction mergeSort xs with\n | case1 x =>\n rcases x with _ | ⟨a, _ | ⟨b, rest⟩⟩ <;> grind\n | case2 _ _ _ _ _ i... | [
{
"name": "sorted_merge",
"text": "theorem sorted_merge {l1 l2 : List α} (hxs : IsSorted l1) (hys : IsSorted l2) :\n IsSorted ⟪merge l1 l2⟫ := by\n grind [hxs.merge hys]\n\n",
"fan_in": 1,
"n_lines": 5,
"n_chars": 143,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_aut... | [
{
"name": "mergeSort_sorted",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 7,
"n_chars": 243,
"n_subproofs": 0,
"n_tactics": 6,
"cyclomatic": 3,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 2,
"automation_only": false,
"max_nestin... | 1 | /-
Copyright (c) 2025 Sorrachai Yingchareonthawornhcai. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sorrachai Yingchareonthawornhcai
-/
module
public import Cslib.Algorithms.Lean.TimeM
public import Mathlib.Data.Nat.Cast.Order.Ring
public import Mathlib.Order.Latt... | /-
Copyright (c) 2025 Sorrachai Yingchareonthawornhcai. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sorrachai Yingchareonthawornhcai
-/
module
public import Cslib.Algorithms.Lean.TimeM
public import Mathlib.Data.Nat.Cast.Order.Ring
public import Mathlib.Order.Latt... | @@ -78,11 +78,15 @@
theorem mem_either_merge (xs ys : List α) (z : α) (hz : z ∈ ⟪merge xs ys⟫) : z ∈ xs ∨ z ∈ ys := by
grind [List.mem_merge]
+theorem sorted_merge {l1 l2 : List α} (hxs : IsSorted l1) (hys : IsSorted l2) :
+ IsSorted ⟪merge l1 l2⟫ := by
+ grind [hxs.merge hys]
+
theorem mergeSort_sorted (xs ... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_19bc54eafde8_1 | fa39cf4d8791d9e0 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Algorithms/Lean/MergeSort/MergeSort.lean | MergeSort | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 9 | 1 | [
{
"theorem_name": "mergeSort_perm",
"depth": 1,
"n_commands": 0,
"n_lines": 10,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n fun_induction mergeSort xs with\n | case1 => simp\n | case2 x _ _ left right ih2 ih1 =>\n simp only [ret_bind]\n ca... | [
{
"name": "merge_perm",
"text": "lemma merge_perm (l₁ l₂ : List α) : ⟪merge l₁ l₂⟫ ~ l₁ ++ l₂ := by\n fun_induction merge with grind [List.merge_perm_append]\n\n",
"fan_in": 1,
"n_lines": 4,
"n_chars": 143,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 1,
... | [
{
"name": "mergeSort_perm",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 12,
"n_chars": 451,
"n_subproofs": 0,
"n_tactics": 10,
"cyclomatic": 1,
"n_automation": 3,
"n_rewrites": 0,
"n_structural": 2,
"automation_only": false,
"max_nestin... | 1 | /-
Copyright (c) 2025 Sorrachai Yingchareonthawornhcai. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sorrachai Yingchareonthawornhcai
-/
module
public import Cslib.Algorithms.Lean.TimeM
public import Mathlib.Data.Nat.Cast.Order.Ring
public import Mathlib.Order.Latt... | /-
Copyright (c) 2025 Sorrachai Yingchareonthawornhcai. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sorrachai Yingchareonthawornhcai
-/
module
public import Cslib.Algorithms.Lean.TimeM
public import Mathlib.Data.Nat.Cast.Order.Ring
public import Mathlib.Order.Latt... | @@ -78,10 +78,19 @@
theorem mem_either_merge (xs ys : List α) (z : α) (hz : z ∈ ⟪merge xs ys⟫) : z ∈ xs ∨ z ∈ ys := by
grind [List.mem_merge]
+lemma merge_perm (l₁ l₂ : List α) : ⟪merge l₁ l₂⟫ ~ l₁ ++ l₂ := by
+ fun_induction merge with grind [List.merge_perm_append]
+
theorem mergeSort_perm (xs : List α) : ⟪me... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_19bc54eafde8_2 | e370bc21b407db40 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Algorithms/Lean/MergeSort/MergeSort.lean | MergeSort | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 9 | 1 | [
{
"theorem_name": "mergeSort_correct",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": "\n ⟨mergeSort_sorted xs, mergeSort_perm xs⟩",
"n_chars": 47,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,... | [
{
"name": "mergeSort_perm",
"text": "theorem mergeSort_perm (xs : List α) : ⟪mergeSort xs⟫ ~ xs := by\n fun_induction mergeSort xs with\n | case1 => simp\n | case2 x _ _ left right ih2 ih1 =>\n simp only [ret_bind]\n calc\n ⟪merge ⟪mergeSort left⟫ ⟪mergeSort right⟫⟫ ~\n ⟪mergeSort left⟫ ... | [
{
"name": "mergeSort_correct",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 4,
"n_lines": 5,
"n_chars": 192,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,
"max_nesti... | 4 | /-
Copyright (c) 2025 Sorrachai Yingchareonthawornhcai. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sorrachai Yingchareonthawornhcai
-/
module
public import Cslib.Algorithms.Lean.TimeM
public import Mathlib.Data.Nat.Cast.Order.Ring
public import Mathlib.Order.Latt... | /-
Copyright (c) 2025 Sorrachai Yingchareonthawornhcai. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sorrachai Yingchareonthawornhcai
-/
module
public import Cslib.Algorithms.Lean.TimeM
public import Mathlib.Data.Nat.Cast.Order.Ring
public import Mathlib.Order.Latt... | @@ -91,8 +91,20 @@
lemma merge_perm (l₁ l₂ : List α) : ⟪merge l₁ l₂⟫ ~ l₁ ++ l₂ := by
fun_induction merge with grind [List.merge_perm_append]
+theorem mergeSort_perm (xs : List α) : ⟪mergeSort xs⟫ ~ xs := by
+ fun_induction mergeSort xs with
+ | case1 => simp
+ | case2 x _ _ left right ih2 ih1 =>
+ simp onl... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_19bc54eafde8_3 | 48537139a4917705 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Algorithms/Lean/MergeSort/MergeSort.lean | MergeSort | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 9 | 2 | [
{
"theorem_name": "clog2_floor_half_le",
"depth": 1,
"n_commands": 0,
"n_lines": 4,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n apply Nat.le_trans _ (clog2_half_le n h)\n apply Nat.clog_monotone\n grind",
"n_chars": 80,
"n_subproofs": 0,... | [
{
"name": "clog2_half_le",
"text": "/-- Key Lemma: ⌈log2 ⌈n/2⌉⌉ ≤ ⌈log2 n⌉ - 1 for n > 1 -/\n@[grind →]\nlemma clog2_half_le (n : ℕ) (h : n > 1) : clog 2 ((n + 1) / 2) ≤ clog 2 n - 1 := by\n grind [Nat.clog_of_one_lt one_lt_two h]\n\n",
"fan_in": 2,
"n_lines": 6,
"n_chars": 214,
"n_subproof... | [
{
"name": "clog2_floor_half_le",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 8,
"n_chars": 259,
"n_subproofs": 0,
"n_tactics": 4,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 2,
"automation_only": false,
"max_nes... | 1 | /-
Copyright (c) 2025 Sorrachai Yingchareonthawornhcai. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sorrachai Yingchareonthawornhcai
-/
module
public import Cslib.Algorithms.Lean.TimeM
public import Mathlib.Data.Nat.Cast.Order.Ring
public import Mathlib.Order.Latt... | /-
Copyright (c) 2025 Sorrachai Yingchareonthawornhcai. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sorrachai Yingchareonthawornhcai
-/
module
public import Cslib.Algorithms.Lean.TimeM
public import Mathlib.Data.Nat.Cast.Order.Ring
public import Mathlib.Order.Latt... | @@ -94,9 +94,17 @@
open Nat (clog)
+/-- Key Lemma: ⌈log2 ⌈n/2⌉⌉ ≤ ⌈log2 n⌉ - 1 for n > 1 -/
+@[grind →]
+lemma clog2_half_le (n : ℕ) (h : n > 1) : clog 2 ((n + 1) / 2) ≤ clog 2 n - 1 := by
+ grind [Nat.clog_of_one_lt one_lt_two h]
+
/-- Same logic for the floor half: ⌈log2 ⌊n/2⌋⌉ ≤ ⌈log2 n⌉ - 1 -/
@[grind →]
-l... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_19bc54eafde8_4 | 6e6f6687263ef9c1 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Algorithms/Lean/MergeSort/MergeSort.lean | MergeSort | 4 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 9 | 1 | [
{
"theorem_name": "some_algebra",
"depth": 1,
"n_commands": 0,
"n_lines": 14,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n -- 1. Substitution: Let N = n_1 + 2 to clean up the expression\n let N := n + 2\n have hN : N ≥ 2 := by omega\n -- 2. Rewr... | [
{
"name": "clog2_floor_half_le",
"text": "/-- Same logic for the floor half: ⌈log2 ⌊n/2⌋⌉ ≤ ⌈log2 n⌉ - 1 -/\n@[grind →]\nlemma clog2_floor_half_le (n : ℕ) (h : n > 1) : clog 2 (n / 2) ≤ clog 2 n - 1 := by\n apply Nat.le_trans _ (clog2_half_le n h)\n apply Nat.clog_monotone\n grind\n\n",
"fan_in": 1,
... | [
{
"name": "some_algebra",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 18,
"n_chars": 776,
"n_subproofs": 7,
"n_tactics": 12,
"cyclomatic": 1,
"n_automation": 5,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": false,
"max_nesting"... | 2 | /-
Copyright (c) 2025 Sorrachai Yingchareonthawornhcai. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sorrachai Yingchareonthawornhcai
-/
module
public import Cslib.Algorithms.Lean.TimeM
public import Mathlib.Data.Nat.Cast.Order.Ring
public import Mathlib.Order.Latt... | /-
Copyright (c) 2025 Sorrachai Yingchareonthawornhcai. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sorrachai Yingchareonthawornhcai
-/
module
public import Cslib.Algorithms.Lean.TimeM
public import Mathlib.Data.Nat.Cast.Order.Ring
public import Mathlib.Order.Latt... | @@ -99,6 +99,13 @@
lemma clog2_half_le (n : ℕ) (h : n > 1) : clog 2 ((n + 1) / 2) ≤ clog 2 n - 1 := by
grind [Nat.clog_of_one_lt one_lt_two h]
+/-- Same logic for the floor half: ⌈log2 ⌊n/2⌋⌉ ≤ ⌈log2 n⌉ - 1 -/
+@[grind →]
+lemma clog2_floor_half_le (n : ℕ) (h : n > 1) : clog 2 (n / 2) ≤ clog 2 n - 1 := by
+ appl... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_19bc54eafde8_5 | 2eee2dea56c1c020 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Algorithms/Lean/MergeSort/MergeSort.lean | MergeSort | 5 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 9 | 1 | [
{
"theorem_name": "timeMergeSortRec_le",
"depth": 1,
"n_commands": 0,
"n_lines": 8,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n fun_induction timeMergeSortRec with\n | case1 => grind\n | case2 => grind\n | case3 n ih2 ih1 =>\n grw [ih1,ih2]\... | [
{
"name": "some_algebra",
"text": "private lemma some_algebra (n : ℕ) :\n (n / 2 + 1) * clog 2 (n / 2 + 1) + ((n + 1) / 2 + 1) * clog 2 ((n + 1) / 2 + 1) + (n + 2) ≤\n (n + 2) * clog 2 (n + 2) := by\n -- 1. Substitution: Let N = n_1 + 2 to clean up the expression\n let N := n + 2\n have hN : N ≥ 2 ... | [
{
"name": "timeMergeSortRec_le",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 3,
"n_lines": 11,
"n_chars": 276,
"n_subproofs": 1,
"n_tactics": 8,
"cyclomatic": 1,
"n_automation": 3,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,
"max_ne... | 3 | /-
Copyright (c) 2025 Sorrachai Yingchareonthawornhcai. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sorrachai Yingchareonthawornhcai
-/
module
public import Cslib.Algorithms.Lean.TimeM
public import Mathlib.Data.Nat.Cast.Order.Ring
public import Mathlib.Order.Latt... | /-
Copyright (c) 2025 Sorrachai Yingchareonthawornhcai. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sorrachai Yingchareonthawornhcai
-/
module
public import Cslib.Algorithms.Lean.TimeM
public import Mathlib.Data.Nat.Cast.Order.Ring
public import Mathlib.Order.Latt... | @@ -106,11 +106,35 @@
apply Nat.clog_monotone
grind
+private lemma some_algebra (n : ℕ) :
+ (n / 2 + 1) * clog 2 (n / 2 + 1) + ((n + 1) / 2 + 1) * clog 2 ((n + 1) / 2 + 1) + (n + 2) ≤
+ (n + 2) * clog 2 (n + 2) := by
+ -- 1. Substitution: Let N = n_1 + 2 to clean up the expression
+ let N := n + 2
+ ha... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_19bc54eafde8_6 | a3410e3432b4fc16 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Algorithms/Lean/MergeSort/MergeSort.lean | MergeSort | 6 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 9 | 1 | [
{
"theorem_name": "mergeSort_time",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n grind [mergeSort_time_le, timeMergeSortRec_le]",
"n_chars": 52,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomati... | [
{
"name": "mergeSort_time_le",
"text": "theorem mergeSort_time_le (xs : List α) :\n (mergeSort xs).time ≤ timeMergeSortRec xs.length := by\n fun_induction mergeSort with\n | case1 =>\n grind\n | case2 _ _ _ _ _ ih2 ih1 =>\n simp only [time_bind]\n grw [merge_time]\n simp only [mergeSort_sa... | [
{
"name": "mergeSort_time",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 7,
"n_lines": 7,
"n_chars": 196,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,
"max_nesting":... | 5 | /-
Copyright (c) 2025 Sorrachai Yingchareonthawornhcai. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sorrachai Yingchareonthawornhcai
-/
module
public import Cslib.Algorithms.Lean.TimeM
public import Mathlib.Data.Nat.Cast.Order.Ring
public import Mathlib.Order.Latt... | /-
Copyright (c) 2025 Sorrachai Yingchareonthawornhcai. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sorrachai Yingchareonthawornhcai
-/
module
public import Cslib.Algorithms.Lean.TimeM
public import Mathlib.Data.Nat.Cast.Order.Ring
public import Mathlib.Order.Latt... | @@ -148,10 +148,23 @@
grind
| _ => simp
+theorem mergeSort_time_le (xs : List α) :
+ (mergeSort xs).time ≤ timeMergeSortRec xs.length := by
+ fun_induction mergeSort with
+ | case1 =>
+ grind
+ | case2 _ _ _ _ _ ih2 ih1 =>
+ simp only [time_bind]
+ grw [merge_time]
+ simp only [mergeSort_sam... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_e98da625b85b_0 | 22af44970730f866 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Computability/Automata/NA/Loop.lean | Loop | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 7 | 1 | [
{
"theorem_name": "loop_run_left_right_left",
"depth": 1,
"n_commands": 0,
"n_lines": 7,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n by_cases n = 1\n · grind [loop_run_left_left]\n · obtain ⟨s, t, h_mtr, _⟩ := loop_run_left_right h (n - 1) (by g... | [
{
"name": "loop_run_left_right",
"text": "lemma loop_run_left_right {xs : ωSequence Symbol} {ss : ωSequence (Unit ⊕ State)}\n (h : na.loop.Run xs ss) (n : ℕ) (h1 : 0 < n) (h2 : ∀ k, 0 < k → k ≤ n → (ss k).isRight) :\n ∃ s t, na.MTr s (xs.take n) t ∧ s ∈ na.start ∧ ss n = inr t := by\n obtain ⟨m, rfl⟩... | [
{
"name": "loop_run_left_right_left",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 11,
"n_chars": 595,
"n_subproofs": 2,
"n_tactics": 8,
"cyclomatic": 2,
"n_automation": 5,
"n_rewrites": 0,
"n_structural": 3,
"automation_only": false,
"m... | 2 | /-
Copyright (c) 2025 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Automata.NA.Total
public import Cslib.Foundations.Data.OmegaSequence.Temporal
/-! # Loop construction on nondeterministi... | /-
Copyright (c) 2025 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Automata.NA.Total
public import Cslib.Foundations.Data.OmegaSequence.Temporal
/-! # Loop construction on nondeterministi... | @@ -44,12 +44,31 @@
obtain ⟨s, t, _⟩ := h_step
refine ⟨s, ?_, t, ?_⟩ <;> grind
+lemma loop_run_left_right {xs : ωSequence Symbol} {ss : ωSequence (Unit ⊕ State)}
+ (h : na.loop.Run xs ss) (n : ℕ) (h1 : 0 < n) (h2 : ∀ k, 0 < k → k ≤ n → (ss k).isRight) :
+ ∃ s t, na.MTr s (xs.take n) t ∧ s ∈ na.start ∧ ss ... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_e98da625b85b_1 | 35cea0ecb0d4fa55 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Computability/Automata/NA/Loop.lean | Loop | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 7 | 1 | [
{
"theorem_name": "loop_run_one_iter",
"depth": 1,
"n_commands": 0,
"n_lines": 10,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have h1' : ∃ k, 0 < k ∧ (ss k).isLeft := by grind\n let n := Nat.find h1'\n have : 0 < n ∧ (ss n).isLeft := Nat.find_s... | [
{
"name": "loop_run_from_left",
"text": "lemma loop_run_from_left {xs : ωSequence Symbol} {ss : ωSequence (Unit ⊕ State)}\n (h : na.loop.Run xs ss) (n : ℕ) (h1 : (ss n).isLeft) :\n na.loop.Run (xs.drop n) (ss.drop n) := by\n apply Run.mk\n · grind [FinAcc.loop, isLeft_iff.mp h1]\n · grind [FinAcc.l... | [
{
"name": "loop_run_one_iter",
"fan_in": 2,
"n_deps_direct": 2,
"n_deps_transitive": 4,
"n_lines": 16,
"n_chars": 855,
"n_subproofs": 4,
"n_tactics": 10,
"cyclomatic": 1,
"n_automation": 6,
"n_rewrites": 0,
"n_structural": 2,
"automation_only": false,
"max_nes... | 4 | /-
Copyright (c) 2025 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Automata.NA.Total
public import Cslib.Foundations.Data.OmegaSequence.Temporal
/-! # Loop construction on nondeterministi... | /-
Copyright (c) 2025 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Automata.NA.Total
public import Cslib.Foundations.Data.OmegaSequence.Temporal
/-! # Loop construction on nondeterministi... | @@ -70,6 +70,13 @@
grind [FinAcc.loop, h.trans (n - 1)]
refine ⟨s, ?_, t', ?_⟩ <;> grind [LTS.MTr.stepR na.toLTS h_mtr h_tr]
+lemma loop_run_from_left {xs : ωSequence Symbol} {ss : ωSequence (Unit ⊕ State)}
+ (h : na.loop.Run xs ss) (n : ℕ) (h1 : (ss n).isLeft) :
+ na.loop.Run (xs.drop n) (ss.drop n... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_e98da625b85b_2 | b6d2f0fff39516e0 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Computability/Automata/NA/Loop.lean | Loop | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 7 | 2 | [
{
"theorem_name": "loop_run_exists",
"depth": 1,
"n_commands": 0,
"n_lines": 8,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n let ts := ωSequence.const (inl () : Unit ⊕ State)\n have h_mtr (k : ℕ) : na.loop.MTr (ts k) (xls k) (ts (k + 1)) := by gri... | [
{
"name": "loop_fin_run_mtr",
"text": "/-- For any finite word in `language na`, there is a corresponding multistep transition\nof `na.loop`. -/\ntheorem loop_fin_run_mtr {xl : List Symbol} (h : xl ∈ language na) :\n na.loop.MTr (inl ()) xl (inl ()) := by\n obtain ⟨sl, _, _, _, h_run⟩ := loop_fin_run_ex... | [
{
"name": "loop_run_exists",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 15,
"n_chars": 849,
"n_subproofs": 4,
"n_tactics": 8,
"cyclomatic": 1,
"n_automation": 3,
"n_rewrites": 0,
"n_structural": 2,
"automation_only": false,
"max_nestin... | 1 | /-
Copyright (c) 2025 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Automata.NA.Total
public import Cslib.Foundations.Data.OmegaSequence.Temporal
/-! # Loop construction on nondeterministi... | /-
Copyright (c) 2025 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Automata.NA.Total
public import Cslib.Foundations.Data.OmegaSequence.Temporal
/-! # Loop construction on nondeterministi... | @@ -111,6 +111,15 @@
= length_drop, = min_def, = getElem_append, = getElem_cons, = List.take_zero, FinAcc.loop,
= map_nil, = getElem_map, = getElem_take, = getElem_drop]
+/-- For any finite word in `language na`, there is a corresponding multistep transition
+of `na.loop`. -/
+theorem loop_fin_run_mtr {... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_9dead45f8800_0 | 25eda3c8ff9b49d2 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Computability/Distributed/FLP/ZeroConsensus.lean | ZeroConsensus | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 10 | 2 | [
{
"theorem_name": "trInv_inv",
"depth": 1,
"n_commands": 0,
"n_lines": 11,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro s x t htr hs\n rcases eq_none_or_eq_some x with _ | ⟨m, rfl⟩\n · grind [Algorithm.lts]\n · have h1 : m.msg = inl (inp m... | [
{
"name": "inv_tr_left",
"text": "/-- What happens when an `inl` message is received. -/\ntheorem inv_tr_left (inp : Fin n → Bool) {s t : State (Fin n) M S} {m : Message (Fin n) M}\n (hs : Inv npos inp s) (htr : (alg npos).lts.Tr s (some m) t) (hm : m.msg.isLeft) :\n t.msgs = s.msgs.erase m +\n (... | [
{
"name": "trInv_inv",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 14,
"n_chars": 567,
"n_subproofs": 3,
"n_tactics": 11,
"cyclomatic": 3,
"n_automation": 5,
"n_rewrites": 0,
"n_structural": 3,
"automation_only": false,
"max_nesting": 6... | 2 | /-
Copyright (c) 2026 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Distributed.FLP.Consensus
public import Cslib.Foundations.Data.OmegaSequence.Temporal
/-! # Asynchronous distributed con... | /-
Copyright (c) 2026 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Distributed.FLP.Consensus
public import Cslib.Foundations.Data.OmegaSequence.Temporal
/-! # Asynchronous distributed con... | @@ -58,6 +58,16 @@
(∀ m, m ∈ s.msgs → m.msg = inl (inp m.dest) ∨ m.msg = inr (inp ⟨0, npos⟩)) ∧
(∀ p, (s.proc p).out = none ∨ (s.proc p).out = some (inp ⟨0, npos⟩))
+/-- What happens when an `inl` message is received. -/
+theorem inv_tr_left (inp : Fin n → Bool) {s t : State (Fin n) M S} {m : Message (Fin n) M}... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_9dead45f8800_1 | ea2a1b483756a35b | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Computability/Distributed/FLP/ZeroConsensus.lean | ZeroConsensus | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 10 | 2 | [
{
"theorem_name": "trInv_inv",
"depth": 1,
"n_commands": 0,
"n_lines": 11,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro s x t htr hs\n rcases eq_none_or_eq_some x with _ | ⟨m, rfl⟩\n · grind [Algorithm.lts]\n · have h1 : m.msg = inl (inp m... | [
{
"name": "inv_tr_left",
"text": "/-- What happens when an `inl` message is received. -/\ntheorem inv_tr_left (inp : Fin n → Bool) {s t : State (Fin n) M S} {m : Message (Fin n) M}\n (hs : Inv npos inp s) (htr : (alg npos).lts.Tr s (some m) t) (hm : m.msg.isLeft) :\n t.msgs = s.msgs.erase m +\n (... | [
{
"name": "reachable_inv",
"fan_in": 2,
"n_deps_direct": 2,
"n_deps_transitive": 4,
"n_lines": 8,
"n_chars": 305,
"n_subproofs": 2,
"n_tactics": 4,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": false,
"max_nesting":... | 4 | /-
Copyright (c) 2026 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Distributed.FLP.Consensus
public import Cslib.Foundations.Data.OmegaSequence.Temporal
/-! # Asynchronous distributed con... | /-
Copyright (c) 2026 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Distributed.FLP.Consensus
public import Cslib.Foundations.Data.OmegaSequence.Temporal
/-! # Asynchronous distributed con... | @@ -63,6 +63,16 @@
Inv npos inp ((alg npos).start inp) := by
simp [alg, Inv, Algorithm.start]
+/-- What happens when an `inl` message is received. -/
+theorem inv_tr_left (inp : Fin n → Bool) {s t : State (Fin n) M S} {m : Message (Fin n) M}
+ (hs : Inv npos inp s) (htr : (alg npos).lts.Tr s (some m) t) (h... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_9dead45f8800_2 | 130380da1480081f | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Computability/Distributed/FLP/ZeroConsensus.lean | ZeroConsensus | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 10 | 2 | [
{
"theorem_name": "trInv_inv",
"depth": 1,
"n_commands": 0,
"n_lines": 11,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro s x t htr hs\n rcases eq_none_or_eq_some x with _ | ⟨m, rfl⟩\n · grind [Algorithm.lts]\n · have h1 : m.msg = inl (inp m... | [
{
"name": "inv_tr_left",
"text": "/-- What happens when an `inl` message is received. -/\ntheorem inv_tr_left (inp : Fin n → Bool) {s t : State (Fin n) M S} {m : Message (Fin n) M}\n (hs : Inv npos inp s) (htr : (alg npos).lts.Tr s (some m) t) (hm : m.msg.isLeft) :\n t.msgs = s.msgs.erase m +\n (... | [
{
"name": "safeConsensus",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 5,
"n_lines": 6,
"n_chars": 196,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": false,
"max_nesting":... | 5 | /-
Copyright (c) 2026 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Distributed.FLP.Consensus
public import Cslib.Foundations.Data.OmegaSequence.Temporal
/-! # Asynchronous distributed con... | /-
Copyright (c) 2026 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Distributed.FLP.Consensus
public import Cslib.Foundations.Data.OmegaSequence.Temporal
/-! # Asynchronous distributed con... | @@ -63,6 +63,16 @@
Inv npos inp ((alg npos).start inp) := by
simp [alg, Inv, Algorithm.start]
+/-- What happens when an `inl` message is received. -/
+theorem inv_tr_left (inp : Fin n → Bool) {s t : State (Fin n) M S} {m : Message (Fin n) M}
+ (hs : Inv npos inp s) (htr : (alg npos).lts.Tr s (some m) t) (h... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_9dead45f8800_3 | 33d3949ed2d9e6e9 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Computability/Distributed/FLP/ZeroConsensus.lean | ZeroConsensus | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 10 | 2 | [
{
"theorem_name": "trInv_inv",
"depth": 1,
"n_commands": 0,
"n_lines": 11,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro s x t htr hs\n rcases eq_none_or_eq_some x with _ | ⟨m, rfl⟩\n · grind [Algorithm.lts]\n · have h1 : m.msg = inl (inp m... | [
{
"name": "inv_tr_left",
"text": "/-- What happens when an `inl` message is received. -/\ntheorem inv_tr_left (inp : Fin n → Bool) {s t : State (Fin n) M S} {m : Message (Fin n) M}\n (hs : Inv npos inp s) (htr : (alg npos).lts.Tr s (some m) t) (hm : m.msg.isLeft) :\n t.msgs = s.msgs.erase m +\n (... | [
{
"name": "always_inv",
"fan_in": 2,
"n_deps_direct": 1,
"n_deps_transitive": 5,
"n_lines": 10,
"n_chars": 449,
"n_subproofs": 0,
"n_tactics": 5,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 3,
"automation_only": false,
"max_nesting": 2... | 5 | /-
Copyright (c) 2026 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Distributed.FLP.Consensus
public import Cslib.Foundations.Data.OmegaSequence.Temporal
/-! # Asynchronous distributed con... | /-
Copyright (c) 2026 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Distributed.FLP.Consensus
public import Cslib.Foundations.Data.OmegaSequence.Temporal
/-! # Asynchronous distributed con... | @@ -63,6 +63,16 @@
Inv npos inp ((alg npos).start inp) := by
simp [alg, Inv, Algorithm.start]
+/-- What happens when an `inl` message is received. -/
+theorem inv_tr_left (inp : Fin n → Bool) {s t : State (Fin n) M S} {m : Message (Fin n) M}
+ (hs : Inv npos inp s) (htr : (alg npos).lts.Tr s (some m) t) (h... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_9dead45f8800_4 | 83e71c4ca3be3e59 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Computability/Distributed/FLP/ZeroConsensus.lean | ZeroConsensus | 4 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 10 | 2 | [
{
"theorem_name": "trInv_inv",
"depth": 1,
"n_commands": 0,
"n_lines": 11,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro s x t htr hs\n rcases eq_none_or_eq_some x with _ | ⟨m, rfl⟩\n · grind [Algorithm.lts]\n · have h1 : m.msg = inl (inp m... | [
{
"name": "inv_tr_left",
"text": "/-- What happens when an `inl` message is received. -/\ntheorem inv_tr_left (inp : Fin n → Bool) {s t : State (Fin n) M S} {m : Message (Fin n) M}\n (hs : Inv npos inp s) (htr : (alg npos).lts.Tr s (some m) t) (hm : m.msg.isLeft) :\n t.msgs = s.msgs.erase m +\n (... | [
{
"name": "left_leadsTo_right",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 6,
"n_lines": 19,
"n_chars": 1016,
"n_subproofs": 6,
"n_tactics": 11,
"cyclomatic": 1,
"n_automation": 6,
"n_rewrites": 0,
"n_structural": 4,
"automation_only": false,
"max_n... | 6 | /-
Copyright (c) 2026 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Distributed.FLP.Consensus
public import Cslib.Foundations.Data.OmegaSequence.Temporal
/-! # Asynchronous distributed con... | /-
Copyright (c) 2026 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Distributed.FLP.Consensus
public import Cslib.Foundations.Data.OmegaSequence.Temporal
/-! # Asynchronous distributed con... | @@ -63,6 +63,16 @@
Inv npos inp ((alg npos).start inp) := by
simp [alg, Inv, Algorithm.start]
+/-- What happens when an `inl` message is received. -/
+theorem inv_tr_left (inp : Fin n → Bool) {s t : State (Fin n) M S} {m : Message (Fin n) M}
+ (hs : Inv npos inp s) (htr : (alg npos).lts.Tr s (some m) t) (h... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_9dead45f8800_5 | 327e5005087c0c5d | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Computability/Distributed/FLP/ZeroConsensus.lean | ZeroConsensus | 5 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 10 | 2 | [
{
"theorem_name": "trInv_inv",
"depth": 1,
"n_commands": 0,
"n_lines": 11,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro s x t htr hs\n rcases eq_none_or_eq_some x with _ | ⟨m, rfl⟩\n · grind [Algorithm.lts]\n · have h1 : m.msg = inl (inp m... | [
{
"name": "inv_tr_left",
"text": "/-- What happens when an `inl` message is received. -/\ntheorem inv_tr_left (inp : Fin n → Bool) {s t : State (Fin n) M S} {m : Message (Fin n) M}\n (hs : Inv npos inp s) (htr : (alg npos).lts.Tr s (some m) t) (hm : m.msg.isLeft) :\n t.msgs = s.msgs.erase m +\n (... | [
{
"name": "right_leadsTo_out",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 6,
"n_lines": 18,
"n_chars": 886,
"n_subproofs": 5,
"n_tactics": 10,
"cyclomatic": 1,
"n_automation": 4,
"n_rewrites": 0,
"n_structural": 4,
"automation_only": false,
"max_nes... | 6 | /-
Copyright (c) 2026 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Distributed.FLP.Consensus
public import Cslib.Foundations.Data.OmegaSequence.Temporal
/-! # Asynchronous distributed con... | /-
Copyright (c) 2026 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Distributed.FLP.Consensus
public import Cslib.Foundations.Data.OmegaSequence.Temporal
/-! # Asynchronous distributed con... | @@ -63,6 +63,16 @@
Inv npos inp ((alg npos).start inp) := by
simp [alg, Inv, Algorithm.start]
+/-- What happens when an `inl` message is received. -/
+theorem inv_tr_left (inp : Fin n → Bool) {s t : State (Fin n) M S} {m : Message (Fin n) M}
+ (hs : Inv npos inp s) (htr : (alg npos).lts.Tr s (some m) t) (h... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_9dead45f8800_6 | f4c3514befb7931c | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Computability/Distributed/FLP/ZeroConsensus.lean | ZeroConsensus | 6 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 10 | 2 | [
{
"theorem_name": "trInv_inv",
"depth": 1,
"n_commands": 0,
"n_lines": 11,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro s x t htr hs\n rcases eq_none_or_eq_some x with _ | ⟨m, rfl⟩\n · grind [Algorithm.lts]\n · have h1 : m.msg = inl (inp m... | [
{
"name": "inv_tr_right",
"text": "/-- What happens when an `inr` message is received. -/\ntheorem inv_tr_right (inp : Fin n → Bool) {s t : State (Fin n) M S} {m : Message (Fin n) M}\n (hs : Inv npos inp s) (htr : (alg npos).lts.Tr s (some m) t) (hm : m.msg.isRight) :\n t.msgs = s.msgs.erase m ∧ (t.pr... | [
{
"name": "consensus_zero",
"fan_in": 0,
"n_deps_direct": 4,
"n_deps_transitive": 10,
"n_lines": 11,
"n_chars": 370,
"n_subproofs": 3,
"n_tactics": 8,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 2,
"automation_only": false,
"max_nestin... | 10 | /-
Copyright (c) 2026 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Distributed.FLP.Consensus
public import Cslib.Foundations.Data.OmegaSequence.Temporal
/-! # Asynchronous distributed con... | /-
Copyright (c) 2026 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Distributed.FLP.Consensus
public import Cslib.Foundations.Data.OmegaSequence.Temporal
/-! # Asynchronous distributed con... | @@ -73,6 +73,14 @@
simp only [alg] at htr
split_ands <;> grind [Inv, Algorithm.lts, Algorithm.recvMsg]
+/-- What happens when an `inr` message is received. -/
+theorem inv_tr_right (inp : Fin n → Bool) {s t : State (Fin n) M S} {m : Message (Fin n) M}
+ (hs : Inv npos inp s) (htr : (alg npos).lts.Tr s (some ... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_c62bad4a56de_0 | df43284b10411792 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Computability/Distributed/FLP/Consensus.lean | Consensus | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 2 | 2 | [
{
"theorem_name": "numProcFaulty_le_not_procFair",
"depth": 1,
"n_commands": 0,
"n_lines": 4,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rw [numProcFaulty, card_eq_nat_card, ← ncard_compl]\n suffices h1 : {p | ProcFaulty p ss xs} ⊆ psᶜ by exact ... | [
{
"name": "not_procFaulty_and_procFair",
"text": "/-- A process `p` cannot be both faulty and fair in an infinite execution. Note, however, that\nit is possible for `p` to be neither faulty nor fair, because `p` can keep on receiving messages\nbut at the same time keep ignoring some messages sent to it. -/... | [
{
"name": "numProcFaulty_le_not_procFair",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 10,
"n_chars": 558,
"n_subproofs": 1,
"n_tactics": 4,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 1,
"automation_only": false,
... | 1 | /-
Copyright (c) 2026 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Distributed.FLP.Algorithm
public import Mathlib.Data.Set.Card
/-! # Fault-tolerant consensus
Roughly speaking, a distri... | /-
Copyright (c) 2026 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Distributed.FLP.Algorithm
public import Mathlib.Data.Set.Card
/-! # Fault-tolerant consensus
Roughly speaking, a distri... | @@ -35,6 +35,14 @@
def ProcFair (p : P) (ss : ωSequence (State P M S)) (xs : ωSequence (Action P M)) : Prop :=
∀ m, m.dest = p → ∀ k, m ∈ (ss k).msgs → ∃ j, k ≤ j ∧ xs j = some m
+/-- A process `p` cannot be both faulty and fair in an infinite execution. Note, however, that
+it is possible for `p` to be neither ... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_c62bad4a56de_1 | 6d31587977e65c7e | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Computability/Distributed/FLP/Consensus.lean | Consensus | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 2 | 2 | [
{
"theorem_name": "numProcFaulty_le_not_procFair",
"depth": 1,
"n_commands": 0,
"n_lines": 4,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rw [numProcFaulty, card_eq_nat_card, ← ncard_compl]\n suffices h1 : {p | ProcFaulty p ss xs} ⊆ psᶜ by exact ... | [
{
"name": "not_procFaulty_and_procFair",
"text": "/-- A process `p` cannot be both faulty and fair in an infinite execution. Note, however, that\nit is possible for `p` to be neither faulty nor fair, because `p` can keep on receiving messages\nbut at the same time keep ignoring some messages sent to it. -/... | [
{
"name": "AdmissibleRun.fault_zero",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 16,
"n_chars": 783,
"n_subproofs": 2,
"n_tactics": 10,
"cyclomatic": 4,
"n_automation": 6,
"n_rewrites": 0,
"n_structural": 4,
"automation_only": false,
"... | 1 | /-
Copyright (c) 2026 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Distributed.FLP.Algorithm
public import Mathlib.Data.Set.Card
/-! # Fault-tolerant consensus
Roughly speaking, a distri... | /-
Copyright (c) 2026 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Distributed.FLP.Algorithm
public import Mathlib.Data.Set.Card
/-! # Fault-tolerant consensus
Roughly speaking, a distri... | @@ -35,6 +35,14 @@
def ProcFair (p : P) (ss : ωSequence (State P M S)) (xs : ωSequence (Action P M)) : Prop :=
∀ m, m.dest = p → ∀ k, m ∈ (ss k).msgs → ∃ j, k ≤ j ∧ xs j = some m
+/-- A process `p` cannot be both faulty and fair in an infinite execution. Note, however, that
+it is possible for `p` to be neither ... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_c62bad4a56de_2 | b197331b79edda80 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Computability/Distributed/FLP/Consensus.lean | Consensus | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 2 | 1 | [
{
"theorem_name": "Algorithm.drop_procFair_iff",
"depth": 1,
"n_commands": 0,
"n_lines": 10,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n constructor <;> intro h\n · by_contra h_contra\n obtain ⟨m, h_m, k, h_k, h_ge⟩ := Algorithm.not_fair_stay_... | [
{
"name": "Algorithm.not_fair_stay_enabled",
"text": "/-- If a process `p` is not fair in an infinite execution of an algorithm `a`, then there is\na message that is in-flight to, but never received, by `p` from some point onward. -/\ntheorem Algorithm.not_fair_stay_enabled\n {ss : ωSequence (State P M S... | [
{
"name": "Algorithm.drop_procFair_iff",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 17,
"n_chars": 622,
"n_subproofs": 3,
"n_tactics": 11,
"cyclomatic": 3,
"n_automation": 3,
"n_rewrites": 0,
"n_structural": 6,
"automation_only": false,
... | 1 | /-
Copyright (c) 2026 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Distributed.FLP.Algorithm
public import Mathlib.Data.Set.Card
/-! # Fault-tolerant consensus
Roughly speaking, a distri... | /-
Copyright (c) 2026 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Distributed.FLP.Algorithm
public import Mathlib.Data.Set.Card
/-! # Fault-tolerant consensus
Roughly speaking, a distri... | @@ -71,6 +71,15 @@
variable {a : Algorithm P M S} {inp : P → Bool}
+/-- If a process `p` is not fair in an infinite execution of an algorithm `a`, then there is
+a message that is in-flight to, but never received, by `p` from some point onward. -/
+theorem Algorithm.not_fair_stay_enabled
+ {ss : ωSequence (Stat... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_5ac898061227_0 | 5bafad7dbdbea55a | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Languages/LambdaCalculus/LocallyNameless/Fsub/Typing.lean | Typing | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 3 | 1 | [
{
"theorem_name": "weaken_head",
"depth": 1,
"n_commands": 0,
"n_lines": 4,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have eq : Δ = [] ++ Δ := by rfl\n rw [eq] at der\n grind [Typing.weaken der wf]",
"n_chars": 87,
"n_subproofs": 1,
... | [
{
"name": "weaken",
"text": "/-- Weakening of typings. -/\nlemma weaken (der : Typing (Γ ++ Δ) t τ) (wf : (Γ ++ Θ ++ Δ).Wf) :\n Typing (Γ ++ Θ ++ Δ) t τ := by\n generalize eq : Γ ++ Δ = ΓΔ at der\n induction der generalizing Γ\n case' abs => apply abs ((Γ ++ Θ ++ Δ).dom ∪ free_union Var)\n case' tabs... | [
{
"name": "weaken_head",
"fan_in": 1,
"n_deps_direct": 5,
"n_deps_transitive": 2,
"n_lines": 8,
"n_chars": 226,
"n_subproofs": 1,
"n_tactics": 4,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 1,
"n_structural": 0,
"automation_only": false,
"max_nesting": 2... | 1 | /-
Copyright (c) 2025 Chris Henson. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Henson
-/
module
public import Cslib.Languages.LambdaCalculus.LocallyNameless.Fsub.Reduction
public import Cslib.Languages.LambdaCalculus.LocallyNameless.Fsub.Subtype
/-! # λ-ca... | /-
Copyright (c) 2025 Chris Henson. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Henson
-/
module
public import Cslib.Languages.LambdaCalculus.LocallyNameless.Fsub.Reduction
public import Cslib.Languages.LambdaCalculus.LocallyNameless.Fsub.Subtype
/-! # λ-ca... | @@ -82,9 +82,24 @@
case app => grind only [LC.app, cases Ty.Wf]
all_goals grind [open_lc]
+/-- Weakening of typings. -/
+lemma weaken (der : Typing (Γ ++ Δ) t τ) (wf : (Γ ++ Θ ++ Δ).Wf) :
+ Typing (Γ ++ Θ ++ Δ) t τ := by
+ generalize eq : Γ ++ Δ = ΓΔ at der
+ induction der generalizing Γ
+ case' abs => ap... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_5ac898061227_1 | fd0ad28ba180ed98 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Languages/LambdaCalculus/LocallyNameless/Fsub/Typing.lean | Typing | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 3 | 1 | [
{
"theorem_name": "weaken_head",
"depth": 1,
"n_commands": 0,
"n_lines": 4,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have eq : Δ = [] ++ Δ := by rfl\n rw [eq] at der\n grind [Typing.weaken der wf]",
"n_chars": 87,
"n_subproofs": 1,
... | [
{
"name": "weaken",
"text": "/-- Weakening of typings. -/\nlemma weaken (der : Typing (Γ ++ Δ) t τ) (wf : (Γ ++ Θ ++ Δ).Wf) :\n Typing (Γ ++ Θ ++ Δ) t τ := by\n generalize eq : Γ ++ Δ = ΓΔ at der\n induction der generalizing Γ\n case' abs => apply abs ((Γ ++ Θ ++ Δ).dom ∪ free_union Var)\n case' tabs... | [
{
"name": "subst_tm",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 3,
"n_lines": 24,
"n_chars": 1169,
"n_subproofs": 1,
"n_tactics": 16,
"cyclomatic": 3,
"n_automation": 7,
"n_rewrites": 0,
"n_structural": 2,
"automation_only": false,
"max_nesting": 6... | 2 | /-
Copyright (c) 2025 Chris Henson. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Henson
-/
module
public import Cslib.Languages.LambdaCalculus.LocallyNameless.Fsub.Reduction
public import Cslib.Languages.LambdaCalculus.LocallyNameless.Fsub.Subtype
/-! # λ-ca... | /-
Copyright (c) 2025 Chris Henson. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Henson
-/
module
public import Cslib.Languages.LambdaCalculus.LocallyNameless.Fsub.Reduction
public import Cslib.Languages.LambdaCalculus.LocallyNameless.Fsub.Subtype
/-! # λ-ca... | @@ -82,9 +82,24 @@
case app => grind only [LC.app, cases Ty.Wf]
all_goals grind [open_lc]
+/-- Weakening of typings. -/
+lemma weaken (der : Typing (Γ ++ Δ) t τ) (wf : (Γ ++ Θ ++ Δ).Wf) :
+ Typing (Γ ++ Θ ++ Δ) t τ := by
+ generalize eq : Γ ++ Δ = ΓΔ at der
+ induction der generalizing Γ
+ case' abs => ap... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_b3da7936b363_0 | 8cb2c2c495d44f39 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Probability/PMF.lean | PMF | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 2 | 2 | [
{
"theorem_name": "bind_pair_tsum_fst",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp_rw [bind_pair_apply, PMF.bind_apply]",
"n_chars": 47,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic... | [
{
"name": "bind_pair_apply",
"text": "/-- Evaluating the \"pairing\" bind `(do let a ← p; return (a, ← f a))` at `(a, b)`\ngives the product `p a * f a b`. -/\ntheorem bind_pair_apply (p : PMF α) (f : α → PMF β) (a : α) (b : β) :\n (p.bind fun a' => (f a').bind fun b' => PMF.pure (a', b')) (a, b) = p a *... | [
{
"name": "bind_pair_tsum_fst",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 7,
"n_chars": 298,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,
"max_nest... | 1 | /-
Copyright (c) 2026 Samuel Schlesinger. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Samuel Schlesinger
-/
module
public import Cslib.Init
public import Mathlib.Probability.ProbabilityMassFunction.Monad
public import Mathlib.Probability.Distributions.Uniform
/-!... | /-
Copyright (c) 2026 Samuel Schlesinger. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Samuel Schlesinger
-/
module
public import Cslib.Init
public import Mathlib.Probability.ProbabilityMassFunction.Monad
public import Mathlib.Probability.Distributions.Uniform
/-!... | @@ -44,10 +44,21 @@
universe u v
variable {α : Type u} {β : Type v}
+/-- Evaluating the "pairing" bind `(do let a ← p; return (a, ← f a))` at `(a, b)`
+gives the product `p a * f a b`. -/
+theorem bind_pair_apply (p : PMF α) (f : α → PMF β) (a : α) (b : β) :
+ (p.bind fun a' => (f a').bind fun b' => PMF.pure (a'... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_b3da7936b363_1 | af44f831ae30d4c2 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Probability/PMF.lean | PMF | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 2 | 2 | [
{
"theorem_name": "bind_pair_tsum_fst",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp_rw [bind_pair_apply, PMF.bind_apply]",
"n_chars": 47,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic... | [
{
"name": "bind_pair_apply",
"text": "/-- Evaluating the \"pairing\" bind `(do let a ← p; return (a, ← f a))` at `(a, b)`\ngives the product `p a * f a b`. -/\ntheorem bind_pair_apply (p : PMF α) (f : α → PMF β) (a : α) (b : β) :\n (p.bind fun a' => (f a').bind fun b' => PMF.pure (a', b')) (a, b) = p a *... | [
{
"name": "posteriorDist_eq_prior_of_outputIndist",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 20,
"n_chars": 897,
"n_subproofs": 3,
"n_tactics": 13,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 5,
"n_structural": 2,
"automation_only"... | 1 | /-
Copyright (c) 2026 Samuel Schlesinger. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Samuel Schlesinger
-/
module
public import Cslib.Init
public import Mathlib.Probability.ProbabilityMassFunction.Monad
public import Mathlib.Probability.Distributions.Uniform
/-!... | /-
Copyright (c) 2026 Samuel Schlesinger. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Samuel Schlesinger
-/
module
public import Cslib.Init
public import Mathlib.Probability.ProbabilityMassFunction.Monad
public import Mathlib.Probability.Distributions.Uniform
/-!... | @@ -44,10 +44,21 @@
universe u v
variable {α : Type u} {β : Type v}
+/-- Evaluating the "pairing" bind `(do let a ← p; return (a, ← f a))` at `(a, b)`
+gives the product `p a * f a b`. -/
+theorem bind_pair_apply (p : PMF α) (f : α → PMF β) (a : α) (b : β) :
+ (p.bind fun a' => (f a').bind fun b' => PMF.pure (a'... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_7b139b2de0e3_0 | 411b20e8b4376f87 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/MachineLearning/PACLearning/VersionSpace.lean | VersionSpace | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 6 | 1 | [
{
"theorem_name": "versionSpace_antitone",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": "\n versionSpace_reindex (Fin.castLE hmn) C S",
"n_chars": 44,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic... | [
{
"name": "versionSpace_reindex",
"text": "/-- *Version space reindexing.* For any reindexing `f : Fin m → Fin n`, the\nversion space on `S` is contained in the version space on the reindexed sample\n`S ∘ f`. -/\ntheorem versionSpace_reindex {m n : ℕ} (f : Fin m → Fin n) (C : ConceptClass α β)\n (S : Lab... | [
{
"name": "versionSpace_antitone",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 10,
"n_chars": 480,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,
"max_... | 1 | /-
Copyright (c) 2026 Dhruv Gupta. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Dhruv Gupta
-/
module
public import Cslib.MachineLearning.PACLearning.Defs
public import Mathlib.MeasureTheory.Measure.Dirac
public import Mathlib.MeasureTheory.Measure.Map
/-! # Versi... | /-
Copyright (c) 2026 Dhruv Gupta. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Dhruv Gupta
-/
module
public import Cslib.MachineLearning.PACLearning.Defs
public import Mathlib.MeasureTheory.Measure.Dirac
public import Mathlib.MeasureTheory.Measure.Map
/-! # Versi... | @@ -66,13 +66,22 @@
ConceptClass α β :=
{h ∈ C | ∀ i : Fin m, h (S i).1 = (S i).2}
+/-- *Version space reindexing.* For any reindexing `f : Fin m → Fin n`, the
+version space on `S` is contained in the version space on the reindexed sample
+`S ∘ f`. -/
+theorem versionSpace_reindex {m n : ℕ} (f : Fin m → Fin ... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_7b139b2de0e3_1 | 6792b1312484239b | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/MachineLearning/PACLearning/VersionSpace.lean | VersionSpace | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 6 | 1 | [
{
"theorem_name": "IsConsistent.empiricalMiscount_eq_zero",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": "\n (mem_versionSpace_iff_empiricalMiscount_zero.mp (hA S)).2",
"n_chars": 60,
"n_subproofs": 0,
... | [
{
"name": "mem_versionSpace_iff_empiricalMiscount_zero",
"text": "/-- Version-space membership equals concept-class membership plus zero empirical\nmiscount (combinatorial bridge). -/\ntheorem mem_versionSpace_iff_empiricalMiscount_zero [DecidableEq β]\n {m : ℕ} {C : ConceptClass α β} {S : LabeledSample ... | [
{
"name": "IsConsistent.empiricalMiscount_eq_zero",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 8,
"n_chars": 354,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": ... | 1 | /-
Copyright (c) 2026 Dhruv Gupta. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Dhruv Gupta
-/
module
public import Cslib.MachineLearning.PACLearning.Defs
public import Mathlib.MeasureTheory.Measure.Dirac
public import Mathlib.MeasureTheory.Measure.Map
/-! # Versi... | /-
Copyright (c) 2026 Dhruv Gupta. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Dhruv Gupta
-/
module
public import Cslib.MachineLearning.PACLearning.Defs
public import Mathlib.MeasureTheory.Measure.Dirac
public import Mathlib.MeasureTheory.Measure.Map
/-! # Versi... | @@ -90,6 +90,15 @@
end EmpiricalMeasure
+/-- Version-space membership equals concept-class membership plus zero empirical
+miscount (combinatorial bridge). -/
+theorem mem_versionSpace_iff_empiricalMiscount_zero [DecidableEq β]
+ {m : ℕ} {C : ConceptClass α β} {S : LabeledSample α β m} {h : α → β} :
+ h ∈ Ve... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_7b139b2de0e3_2 | 0357dcfda4c320a7 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/MachineLearning/PACLearning/VersionSpace.lean | VersionSpace | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 6 | 1 | [
{
"theorem_name": "IsConsistent.empiricalError_eq_zero",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": "\n (mem_versionSpace_iff_empiricalError_zero.mp (hA S)).2",
"n_chars": 57,
"n_subproofs": 0,
"n_t... | [
{
"name": "mem_versionSpace_iff_empiricalError_zero",
"text": "/-- Version-space membership equals concept-class membership plus zero empirical\nerror (measure-theoretic bridge). -/\ntheorem mem_versionSpace_iff_empiricalError_zero\n [MeasurableSpace α] [MeasurableSpace β]\n [MeasurableSingletonClass ... | [
{
"name": "IsConsistent.empiricalError_eq_zero",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 12,
"n_chars": 463,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": fa... | 1 | /-
Copyright (c) 2026 Dhruv Gupta. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Dhruv Gupta
-/
module
public import Cslib.MachineLearning.PACLearning.Defs
public import Mathlib.MeasureTheory.Measure.Dirac
public import Mathlib.MeasureTheory.Measure.Map
/-! # Versi... | /-
Copyright (c) 2026 Dhruv Gupta. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Dhruv Gupta
-/
module
public import Cslib.MachineLearning.PACLearning.Defs
public import Mathlib.MeasureTheory.Measure.Dirac
public import Mathlib.MeasureTheory.Measure.Map
/-! # Versi... | @@ -90,6 +90,43 @@
end EmpiricalMeasure
+/-- Version-space membership equals concept-class membership plus zero empirical
+error (measure-theoretic bridge). -/
+theorem mem_versionSpace_iff_empiricalError_zero
+ [MeasurableSpace α] [MeasurableSpace β]
+ [MeasurableSingletonClass α] [MeasurableSingletonClass ... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_7b139b2de0e3_3 | 022dd4d72bd2dbbb | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/MachineLearning/PACLearning/VersionSpace.lean | VersionSpace | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 6 | 1 | [
{
"theorem_name": "Realizable.versionSpace_nonempty",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": "\n ⟨h.choose, mem_versionSpace_of_realizable h.choose_spec.1 S h.choose_spec.2⟩",
"n_chars": 83,
"n_subp... | [
{
"name": "mem_versionSpace_of_realizable",
"text": "/-- *Realizable version-space nonemptiness.* If a target concept `c` lies in\n`C` and the sample `S` is labeled by `c` (i.e. every `(S i).2 = c (S i).1`),\nthen `c` itself lies in the version space `VersionSpace C S`. -/\ntheorem mem_versionSpace_of_reali... | [
{
"name": "Realizable.versionSpace_nonempty",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 9,
"n_chars": 342,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,... | 1 | /-
Copyright (c) 2026 Dhruv Gupta. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Dhruv Gupta
-/
module
public import Cslib.MachineLearning.PACLearning.Defs
public import Mathlib.MeasureTheory.Measure.Dirac
public import Mathlib.MeasureTheory.Measure.Map
/-! # Versi... | /-
Copyright (c) 2026 Dhruv Gupta. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Dhruv Gupta
-/
module
public import Cslib.MachineLearning.PACLearning.Defs
public import Mathlib.MeasureTheory.Measure.Dirac
public import Mathlib.MeasureTheory.Measure.Map
/-! # Versi... | @@ -102,10 +102,20 @@
def Realizable {m : ℕ} (C : ConceptClass α β) (S : LabeledSample α β m) : Prop :=
∃ c ∈ C, ∀ i : Fin m, (S i).2 = c (S i).1
+/-- *Realizable version-space nonemptiness.* If a target concept `c` lies in
+`C` and the sample `S` is labeled by `c` (i.e. every `(S i).2 = c (S i).1`),
+then `c` it... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_7b139b2de0e3_4 | ef6ae780a24d5839 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/MachineLearning/PACLearning/VersionSpace.lean | VersionSpace | 4 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 6 | 1 | [
{
"theorem_name": "pi_map_graph_eq_one",
"depth": 1,
"n_commands": 0,
"n_lines": 6,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hφ : Measurable (fun x : α => (x, c x)) := by fun_prop\n haveI : IsProbabilityMeasure (P.map (fun x : α => (x, c ... | [
{
"name": "map_graph_eq_one",
"text": "/-- Under the pushforward of a probability measure `P` along the graph map\n`x ↦ (x, c x)`, the graph of `c` has measure `1`. -/\nprivate lemma map_graph_eq_one\n [MeasurableSpace α] [MeasurableSpace β]\n {c : α → β} (hcm : Measurable c) (P : Measure α) [IsProbab... | [
{
"name": "pi_map_graph_eq_one",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 15,
"n_chars": 762,
"n_subproofs": 1,
"n_tactics": 6,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 1,
"n_structural": 0,
"automation_only": false,
"max_ne... | 1 | /-
Copyright (c) 2026 Dhruv Gupta. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Dhruv Gupta
-/
module
public import Cslib.MachineLearning.PACLearning.Defs
public import Mathlib.MeasureTheory.Measure.Dirac
public import Mathlib.MeasureTheory.Measure.Map
/-! # Versi... | /-
Copyright (c) 2026 Dhruv Gupta. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Dhruv Gupta
-/
module
public import Cslib.MachineLearning.PACLearning.Defs
public import Mathlib.MeasureTheory.Measure.Dirac
public import Mathlib.MeasureTheory.Measure.Map
/-! # Versi... | @@ -102,6 +102,19 @@
def Realizable {m : ℕ} (C : ConceptClass α β) (S : LabeledSample α β m) : Prop :=
∃ c ∈ C, ∀ i : Fin m, (S i).2 = c (S i).1
+/-- Under the pushforward of a probability measure `P` along the graph map
+`x ↦ (x, c x)`, the graph of `c` has measure `1`. -/
+private lemma map_graph_eq_one
+ [M... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_7b139b2de0e3_5 | 9cc3f35ecbb9aaec | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/MachineLearning/PACLearning/VersionSpace.lean | VersionSpace | 5 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 6 | 1 | [
{
"theorem_name": "ae_mem_versionSpace_of_realizable",
"depth": 1,
"n_commands": 0,
"n_lines": 15,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hφ : Measurable (fun x : α => (x, c x)) := by fun_prop\n haveI : IsProbabilityMeasure (P.map (fun ... | [
{
"name": "pi_map_graph_eq_one",
"text": "/-- The iid product of the realizable joint distribution assigns measure `1`\nto the set of samples where every coordinate lies on the graph of `c`. -/\nprivate lemma pi_map_graph_eq_one\n [MeasurableSpace α] [MeasurableSpace β]\n {c : α → β} (hcm : Measurable... | [
{
"name": "ae_mem_versionSpace_of_realizable",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 2,
"n_lines": 27,
"n_chars": 1430,
"n_subproofs": 3,
"n_tactics": 15,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 2,
"n_structural": 3,
"automation_only": fa... | 2 | /-
Copyright (c) 2026 Dhruv Gupta. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Dhruv Gupta
-/
module
public import Cslib.MachineLearning.PACLearning.Defs
public import Mathlib.MeasureTheory.Measure.Dirac
public import Mathlib.MeasureTheory.Measure.Map
/-! # Versi... | /-
Copyright (c) 2026 Dhruv Gupta. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Dhruv Gupta
-/
module
public import Cslib.MachineLearning.PACLearning.Defs
public import Mathlib.MeasureTheory.Measure.Dirac
public import Mathlib.MeasureTheory.Measure.Map
/-! # Versi... | @@ -115,6 +115,20 @@
ext x; simp
rw [hpre, measure_univ]
+/-- The iid product of the realizable joint distribution assigns measure `1`
+to the set of samples where every coordinate lies on the graph of `c`. -/
+private lemma pi_map_graph_eq_one
+ [MeasurableSpace α] [MeasurableSpace β]
+ {c : α → β} (hc... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_e524093eaa22_0 | 115e7fa5e1ec3347 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Crypto/Protocols/PerfectSecrecy/Internal/OneTimePad.lean | OneTimePad | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 1 | 1 | [
{
"theorem_name": "otp_ciphertextDist_eq_uniform",
"depth": 1,
"n_commands": 0,
"n_lines": 1,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by simp [PMF.ext_iff, eq_xor_iff_xor_eq]",
"n_chars": 41,
"n_subproofs": 0,
"n_tactics": 1,
"cyclom... | [
{
"name": "eq_xor_iff_xor_eq",
"text": "/-- XOR by a fixed mask is self-inverse on `BitVec`: `c = k ^^^ m ↔ c ^^^ m = k`. -/\nlemma eq_xor_iff_xor_eq {l : ℕ} (c m k : BitVec l) :\n (c = k ^^^ m) ↔ (c ^^^ m = k) := by grind\n\n",
"fan_in": 1,
"n_lines": 5,
"n_chars": 191,
"n_subproofs": 0,... | [
{
"name": "otp_ciphertextDist_eq_uniform",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 7,
"n_chars": 312,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,
... | 1 | /-
Copyright (c) 2026 Samuel Schlesinger. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Samuel Schlesinger
-/
module
public import Cslib.Init
public import Mathlib.Probability.Distributions.Uniform
/-!
# One-Time Pad: Internal proofs
The OTP ciphertext distributio... | /-
Copyright (c) 2026 Samuel Schlesinger. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Samuel Schlesinger
-/
module
public import Cslib.Init
public import Mathlib.Probability.Distributions.Uniform
/-!
# One-Time Pad: Internal proofs
The OTP ciphertext distributio... | @@ -25,11 +25,15 @@
⟨BitVec.ofFin, BitVec.toFin, fun x => by simp, fun x => by simp⟩
-- TODO: upstream to Mathlib — general BitVec XOR cancellation lemma.
+/-- XOR by a fixed mask is self-inverse on `BitVec`: `c = k ^^^ m ↔ c ^^^ m = k`. -/
+lemma eq_xor_iff_xor_eq {l : ℕ} (c m k : BitVec l) :
+ (c = k ^^^ m... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_029769893136_0 | b689608c7c0904e8 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Computability/Automata/NA/Pair.lean | Pair | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 1 | 1 | [
{
"theorem_name": "LTS.pairViaLang_regular",
"depth": 1,
"n_commands": 0,
"n_lines": 3,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n apply IsRegular.iSup\n grind [Language.IsRegular.mul, LTS.pairLang_regular]",
"n_chars": 81,
"n_subproofs"... | [
{
"name": "LTS.pairLang_regular",
"text": "/-- `LTS.pairLang s t` is a regular language if there are only finitely many states. -/\n@[simp]\ntheorem LTS.pairLang_regular [Finite State] {lts : LTS State Symbol} {s t : State} :\n (lts.pairLang s t).IsRegular := by\n rw [IsRegular.iff_nfa]\n use State, in... | [
{
"name": "LTS.pairViaLang_regular",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 8,
"n_chars": 353,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": false,
"max... | 1 | /-
Copyright (c) 2025 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Languages.RegularLanguage
/-! # Languages determined by pairs of states
-/
@[expose] public section
namespace Cslib
o... | /-
Copyright (c) 2025 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Languages.RegularLanguage
/-! # Languages determined by pairs of states
-/
@[expose] public section
namespace Cslib
o... | @@ -28,6 +28,15 @@
theorem LTS.mem_pairLang {lts : LTS State Symbol} {s t : State} {xs : List Symbol} :
xs ∈ lts.pairLang s t ↔ lts.MTr s xs t := Iff.rfl
+/-- `LTS.pairLang s t` is a regular language if there are only finitely many states. -/
+@[simp]
+theorem LTS.pairLang_regular [Finite State] {lts : LTS Stat... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_4eac055ecd2d_1 | 183aa9bd41eb70f9 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Languages/LambdaCalculus/LocallyNameless/Stlc/Basic.lean | Basic | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 5 | 1 | [
{
"theorem_name": "subst_aux",
"depth": 1,
"n_commands": 0,
"n_lines": 14,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n generalize eq : Δ ++ ⟨x, σ⟩ :: Γ = Θ at h\n induction h generalizing Γ Δ der\n case app => grind\n case var x' _ ok _ =>\n ... | [
{
"name": "weaken",
"text": "/-- Weakening of a typing derivation by an additional context. -/\nlemma weaken (der : Γ ⊢ t ∶ τ) (ok : (Γ ++ Δ)✓) : Γ ++ Δ ⊢ t ∶ τ := by\n grind [List.append_nil (Γ ++ Δ), weaken_aux]\n\nomit [DecidableEq Var] in\n",
"fan_in": 1,
"n_lines": 6,
"n_chars": 230,
"... | [
{
"name": "subst_aux",
"fan_in": 1,
"n_deps_direct": 3,
"n_deps_transitive": 4,
"n_lines": 18,
"n_chars": 680,
"n_subproofs": 1,
"n_tactics": 15,
"cyclomatic": 4,
"n_automation": 5,
"n_rewrites": 1,
"n_structural": 2,
"automation_only": false,
"max_nesting": 4... | 3 | /-
Copyright (c) 2025 Chris Henson. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Henson
-/
module
public import Cslib.Languages.LambdaCalculus.LocallyNameless.Context
public import Cslib.Languages.LambdaCalculus.LocallyNameless.Untyped.Properties
/-! # λ-cal... | /-
Copyright (c) 2025 Chris Henson. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Henson
-/
module
public import Cslib.Languages.LambdaCalculus.LocallyNameless.Context
public import Cslib.Languages.LambdaCalculus.LocallyNameless.Untyped.Properties
/-! # λ-cal... | @@ -82,6 +82,11 @@
| abs xs => grind [Typing.abs (xs ∪ (Γ ++ Θ ++ Δ).dom), List.nodupKeys_cons]
| _ => grind
+/-- Weakening of a typing derivation by an additional context. -/
+lemma weaken (der : Γ ⊢ t ∶ τ) (ok : (Γ ++ Δ)✓) : Γ ++ Δ ⊢ t ∶ τ := by
+ grind [List.append_nil (Γ ++ Δ), weaken_aux]
+
+omit [Decidab... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_4eac055ecd2d_2 | caf262d11a33a60e | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Languages/LambdaCalculus/LocallyNameless/Stlc/Basic.lean | Basic | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 5 | 1 | [
{
"theorem_name": "typing_subst_head",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n grind [subst_aux]",
"n_chars": 23,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation":... | [
{
"name": "subst_aux",
"text": "/-- Substitution for a context weakened by a single type between appended contexts. -/\nlemma subst_aux (h : Δ ++ ⟨x, σ⟩ :: Γ ⊢ t ∶ τ) (der : Γ ⊢ s ∶ σ) :\n Δ ++ Γ ⊢ t[x := s] ∶ τ := by\n generalize eq : Δ ++ ⟨x, σ⟩ :: Γ = Θ at h\n induction h generalizing Γ Δ der\n cas... | [
{
"name": "typing_subst_head",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 5,
"n_lines": 6,
"n_chars": 208,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,
"max_nestin... | 4 | /-
Copyright (c) 2025 Chris Henson. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Henson
-/
module
public import Cslib.Languages.LambdaCalculus.LocallyNameless.Context
public import Cslib.Languages.LambdaCalculus.LocallyNameless.Untyped.Properties
/-! # λ-cal... | /-
Copyright (c) 2025 Chris Henson. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Henson
-/
module
public import Cslib.Languages.LambdaCalculus.LocallyNameless.Context
public import Cslib.Languages.LambdaCalculus.LocallyNameless.Untyped.Properties
/-! # λ-cal... | @@ -98,9 +98,27 @@
open Term
+/-- Substitution for a context weakened by a single type between appended contexts. -/
+lemma subst_aux (h : Δ ++ ⟨x, σ⟩ :: Γ ⊢ t ∶ τ) (der : Γ ⊢ s ∶ σ) :
+ Δ ++ Γ ⊢ t[x := s] ∶ τ := by
+ generalize eq : Δ ++ ⟨x, σ⟩ :: Γ = Θ at h
+ induction h generalizing Γ Δ der
+ case app => ... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_4eac055ecd2d_3 | 58d4694dad9708bf | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Languages/LambdaCalculus/LocallyNameless/Stlc/Basic.lean | Basic | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 5 | 1 | [
{
"theorem_name": "preservation_open",
"depth": 1,
"n_commands": 0,
"n_lines": 3,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have ⟨fresh, _⟩ := fresh_exists <| free_union [Term.fv] Var\n grind [subst_intro fresh _ _ ?_, typing_subst_head]",
... | [
{
"name": "typing_subst_head",
"text": "/-- Substitution for a context weakened by a single type. -/\nlemma typing_subst_head (weak : ⟨x, σ⟩ :: Γ ⊢ t ∶ τ) (der : Γ ⊢ s ∶ σ) :\n Γ ⊢ (t[x := s]) ∶ τ := by\n grind [subst_aux]\n\n",
"fan_in": 1,
"n_lines": 6,
"n_chars": 208,
"n_subproofs": 0... | [
{
"name": "preservation_open",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 6,
"n_lines": 8,
"n_chars": 329,
"n_subproofs": 1,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,
"max_nesti... | 5 | /-
Copyright (c) 2025 Chris Henson. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Henson
-/
module
public import Cslib.Languages.LambdaCalculus.LocallyNameless.Context
public import Cslib.Languages.LambdaCalculus.LocallyNameless.Untyped.Properties
/-! # λ-cal... | /-
Copyright (c) 2025 Chris Henson. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Henson
-/
module
public import Cslib.Languages.LambdaCalculus.LocallyNameless.Context
public import Cslib.Languages.LambdaCalculus.LocallyNameless.Untyped.Properties
/-! # λ-cal... | @@ -115,10 +115,17 @@
case abs =>
grind [Typing.abs <| free_union Var, subst_open_var _ _ _ _ ?_ der.lc]
+/-- Substitution for a context weakened by a single type. -/
+lemma typing_subst_head (weak : ⟨x, σ⟩ :: Γ ⊢ t ∶ τ) (der : Γ ⊢ s ∶ σ) :
+ Γ ⊢ (t[x := s]) ∶ τ := by
+ grind [subst_aux]
+
/-- Typing pre... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_822f6b3064fc_0 | 85b5cc6b7d4e8d2a | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Crypto/Protocols/SecretSharing/Shamir.lean | Shamir | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 4 | 2 | [
{
"theorem_name": "privacyCorrectionPolynomial_eval",
"depth": 1,
"n_commands": 0,
"n_lines": 9,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n classical\n simpa using!\n (_root_.Lagrange.eval_interpolate_at_node\n (s := s.attach)\n (v ... | [
{
"name": "points_injOn_subtype",
"text": "private theorem points_injOn_subtype {F Party : Type*} [Field F] [Fintype Party]\n (params : Params F Party) (s : Finset Party) :\n Set.InjOn (fun i : s => params.point i) (s.attach : Finset s) := by\n intro i _ j _ hij\n apply Subtype.ext\n exact params.p... | [
{
"name": "privacyCorrectionPolynomial_eval",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 15,
"n_chars": 555,
"n_subproofs": 0,
"n_tactics": 9,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,... | 1 | /-
Copyright (c) 2026 Samuel Schlesinger. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Samuel Schlesinger
-/
module
public import Cslib.Crypto.Protocols.SecretSharing.Scheme
public import Mathlib.Probability.Distributions.Uniform
public import Cslib.Crypto.Protocol... | /-
Copyright (c) 2026 Samuel Schlesinger. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Samuel Schlesinger
-/
module
public import Cslib.Crypto.Protocols.SecretSharing.Scheme
public import Mathlib.Probability.Distributions.Uniform
public import Cslib.Crypto.Protocol... | @@ -133,17 +133,41 @@
exact _root_.Lagrange.interpolate s.attach (fun i : s => params.point i)
(fun i : s => (secret₀ - secret₁) / params.point i)
+private theorem points_injOn_subtype {F Party : Type*} [Field F] [Fintype Party]
+ (params : Params F Party) (s : Finset Party) :
+ Set.InjOn (fun i : s... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_822f6b3064fc_1 | b47868b0d9f9f045 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Crypto/Protocols/SecretSharing/Shamir.lean | Shamir | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 4 | 1 | [
{
"theorem_name": "view_eq_view_add_privacyCorrection",
"depth": 1,
"n_commands": 0,
"n_lines": 8,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n ext i\n unfold share\n rw [Polynomial.sharingPolynomial_eval, Polynomial.sharingPolynomial_eval]\n rw... | [
{
"name": "tailPolynomial_privacyCorrection",
"text": "private theorem tailPolynomial_privacyCorrection\n (params : Params F Party) (s : Finset Party)\n (hcard : s.card ≤ params.threshold)\n (secret₀ secret₁ : F) :\n Polynomial.tailPolynomial (F := F) params.threshold\n (privacyCorrection... | [
{
"name": "view_eq_view_add_privacyCorrection",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 3,
"n_lines": 18,
"n_chars": 733,
"n_subproofs": 0,
"n_tactics": 8,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 4,
"n_structural": 1,
"automation_only": fal... | 3 | /-
Copyright (c) 2026 Samuel Schlesinger. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Samuel Schlesinger
-/
module
public import Cslib.Crypto.Protocols.SecretSharing.Scheme
public import Mathlib.Probability.Distributions.Uniform
public import Cslib.Crypto.Protocol... | /-
Copyright (c) 2026 Samuel Schlesinger. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Samuel Schlesinger
-/
module
public import Cslib.Crypto.Protocols.SecretSharing.Scheme
public import Mathlib.Probability.Distributions.Uniform
public import Cslib.Crypto.Protocol... | @@ -178,6 +178,15 @@
_root_.Polynomial.mem_degreeLT.2
(privacyCorrectionPolynomial_degree_lt (F := F) params s secret₀ secret₁ hcard)⟩
+private theorem tailPolynomial_privacyCorrection
+ (params : Params F Party) (s : Finset Party)
+ (hcard : s.card ≤ params.threshold)
+ (secret₀ secret₁ : F)... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_822f6b3064fc_2 | ea960a3e6935b9b4 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Crypto/Protocols/SecretSharing/Shamir.lean | Shamir | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 4 | 1 | [
{
"theorem_name": "view_indist_of_tailSampler",
"depth": 1,
"n_commands": 0,
"n_lines": 29,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro s hs secret₀ secret₁\n have hcard : s.card ≤ params.threshold := by\n have hs' : ¬ params.threshold +... | [
{
"name": "view_eq_view_add_privacyCorrection",
"text": "private theorem view_eq_view_add_privacyCorrection\n (params : Params F Party) (s : Finset Party)\n (hcard : s.card ≤ params.threshold)\n (secret₀ secret₁ : F) (coeffs : Randomness params) :\n (fun i : s => share params coeffs secret₀ i) =... | [
{
"name": "view_indist_of_tailSampler",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 4,
"n_lines": 37,
"n_chars": 1652,
"n_subproofs": 2,
"n_tactics": 29,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 4,
"n_structural": 5,
"automation_only": false,
... | 4 | /-
Copyright (c) 2026 Samuel Schlesinger. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Samuel Schlesinger
-/
module
public import Cslib.Crypto.Protocols.SecretSharing.Scheme
public import Mathlib.Probability.Distributions.Uniform
public import Cslib.Crypto.Protocol... | /-
Copyright (c) 2026 Samuel Schlesinger. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Samuel Schlesinger
-/
module
public import Cslib.Crypto.Protocols.SecretSharing.Scheme
public import Mathlib.Probability.Distributions.Uniform
public import Cslib.Crypto.Protocol... | @@ -187,13 +187,58 @@
privacyCorrectionPolynomial (F := F) params s secret₀ secret₁ := by
simp [privacyCorrection, Polynomial.tailPolynomial]
+private theorem view_eq_view_add_privacyCorrection
+ (params : Params F Party) (s : Finset Party)
+ (hcard : s.card ≤ params.threshold)
+ (secret₀ secret₁ :... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_849baf40dc30_0 | b285da0e97afe7af | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Foundations/Relation/Confluence.lean | Confluence | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 15 | 3 | [
{
"theorem_name": "SemiConfluent_iff_ChurchRosser",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": "\n List.TFAE.out confluent_equivalents 1 0",
"n_chars": 42,
"n_subproofs": 0,
"n_tactics": 1,
"cyc... | [
{
"name": "confluent_equivalents",
"text": "private theorem confluent_equivalents : [ChurchRosser r, SemiConfluent r, Confluent r].TFAE := by\n grind [List.tfae_cons_cons, List.tfae_singleton]\n\n",
"fan_in": 3,
"n_lines": 4,
"n_chars": 150,
"n_subproofs": 0,
"n_tactics": 2,
"cyclom... | [
{
"name": "SemiConfluent_iff_ChurchRosser",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 4,
"n_chars": 122,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,
... | 1 | /-
Copyright (c) 2025 Fabrizio Montesi and Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Fabrizio Montesi, Thomas Waring, Chris Henson
-/
module
public import Cslib.Foundations.Relation.Defs
public import Mathlib.Data.List.TFAE
public import Mathlib.O... | /-
Copyright (c) 2025 Fabrizio Montesi and Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Fabrizio Montesi, Thomas Waring, Chris Henson
-/
module
public import Cslib.Foundations.Relation.Defs
public import Mathlib.Data.List.TFAE
public import Mathlib.O... | @@ -107,8 +107,12 @@
attribute [scoped grind →] Confluent.toChurchRosser SemiConfluent.toConfluent
-theorem SemiConfluent_iff_ChurchRosser : SemiConfluent r ↔ ChurchRosser r := sorry
+private theorem confluent_equivalents : [ChurchRosser r, SemiConfluent r, Confluent r].TFAE := by
+ grind [List.tfae_cons_cons, Li... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_849baf40dc30_1 | 92461009ad1248e2 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Foundations/Relation/Confluence.lean | Confluence | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 15 | 3 | [
{
"theorem_name": "SemiConfluent_iff_ChurchRosser",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": "\n List.TFAE.out confluent_equivalents 1 0",
"n_chars": 42,
"n_subproofs": 0,
"n_tactics": 1,
"cyc... | [
{
"name": "confluent_equivalents",
"text": "private theorem confluent_equivalents : [ChurchRosser r, SemiConfluent r, Confluent r].TFAE := by\n grind [List.tfae_cons_cons, List.tfae_singleton]\n\n",
"fan_in": 3,
"n_lines": 4,
"n_chars": 150,
"n_subproofs": 0,
"n_tactics": 2,
"cyclom... | [
{
"name": "Confluent_iff_ChurchRosser",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 4,
"n_chars": 114,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,
"... | 1 | /-
Copyright (c) 2025 Fabrizio Montesi and Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Fabrizio Montesi, Thomas Waring, Chris Henson
-/
module
public import Cslib.Foundations.Relation.Defs
public import Mathlib.Data.List.TFAE
public import Mathlib.O... | /-
Copyright (c) 2025 Fabrizio Montesi and Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Fabrizio Montesi, Thomas Waring, Chris Henson
-/
module
public import Cslib.Foundations.Relation.Defs
public import Mathlib.Data.List.TFAE
public import Mathlib.O... | @@ -107,8 +107,12 @@
attribute [scoped grind →] Confluent.toChurchRosser SemiConfluent.toConfluent
-theorem Confluent_iff_ChurchRosser : Confluent r ↔ ChurchRosser r := sorry
+private theorem confluent_equivalents : [ChurchRosser r, SemiConfluent r, Confluent r].TFAE := by
+ grind [List.tfae_cons_cons, List.tfae_... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_849baf40dc30_2 | 2cde62e93f2eafaf | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Foundations/Relation/Confluence.lean | Confluence | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 15 | 3 | [
{
"theorem_name": "SemiConfluent_iff_ChurchRosser",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": "\n List.TFAE.out confluent_equivalents 1 0",
"n_chars": 42,
"n_subproofs": 0,
"n_tactics": 1,
"cyc... | [
{
"name": "confluent_equivalents",
"text": "private theorem confluent_equivalents : [ChurchRosser r, SemiConfluent r, Confluent r].TFAE := by\n grind [List.tfae_cons_cons, List.tfae_singleton]\n\n",
"fan_in": 3,
"n_lines": 4,
"n_chars": 150,
"n_subproofs": 0,
"n_tactics": 2,
"cyclom... | [
{
"name": "Confluent_iff_SemiConfluent",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 4,
"n_chars": 116,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,
... | 1 | /-
Copyright (c) 2025 Fabrizio Montesi and Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Fabrizio Montesi, Thomas Waring, Chris Henson
-/
module
public import Cslib.Foundations.Relation.Defs
public import Mathlib.Data.List.TFAE
public import Mathlib.O... | /-
Copyright (c) 2025 Fabrizio Montesi and Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Fabrizio Montesi, Thomas Waring, Chris Henson
-/
module
public import Cslib.Foundations.Relation.Defs
public import Mathlib.Data.List.TFAE
public import Mathlib.O... | @@ -107,8 +107,12 @@
attribute [scoped grind →] Confluent.toChurchRosser SemiConfluent.toConfluent
-theorem Confluent_iff_SemiConfluent : Confluent r ↔ SemiConfluent r := sorry
+private theorem confluent_equivalents : [ChurchRosser r, SemiConfluent r, Confluent r].TFAE := by
+ grind [List.tfae_cons_cons, List.tfa... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_849baf40dc30_3 | f2246586969d2fcf | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Foundations/Relation/Confluence.lean | Confluence | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 15 | 14 | [
{
"theorem_name": "Confluent.toChurchRosser",
"depth": 1,
"n_commands": 0,
"n_lines": 12,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro x y h_eqv\n induction h_eqv with\n | rel _ b => exists b; grind [ReflTransGen.single]\n | refl a => exis... | [
{
"name": "SN.intro",
"text": "lemma SN.intro : (h : ∀ y, r x y → SN r y) → SN r x := (SN_iff_SN_of_rel x).mpr\n\n",
"fan_in": 14,
"n_lines": 3,
"n_chars": 87,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 0,
"a... | [
{
"name": "SN.of_normal",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 3,
"n_chars": 93,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,
"max_nesting": 1... | 1 | /-
Copyright (c) 2025 Fabrizio Montesi and Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Fabrizio Montesi, Thomas Waring, Chris Henson
-/
module
public import Cslib.Foundations.Relation.Defs
public import Mathlib.Data.List.TFAE
public import Mathlib.O... | /-
Copyright (c) 2025 Fabrizio Montesi and Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Fabrizio Montesi, Thomas Waring, Chris Henson
-/
module
public import Cslib.Foundations.Relation.Defs
public import Mathlib.Data.List.TFAE
public import Mathlib.O... | @@ -115,6 +115,8 @@
set_option linter.tacticAnalysis.verifyGrindOnly false in
lemma SN_iff_SN_of_rel (x : α) : SN r x ↔ ∀ y, r x y → SN r y := by grind only [Acc]
+lemma SN.intro : (h : ∀ y, r x y → SN r y) → SN r x := (SN_iff_SN_of_rel x).mpr
+
lemma SN.of_rel (hx : SN r x) (h : r x y) : SN r y := Acc.inv hx h
... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_849baf40dc30_4 | 38414947a9944ce8 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Foundations/Relation/Confluence.lean | Confluence | 4 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 15 | 1 | [
{
"theorem_name": "SN.isNormalizable",
"depth": 1,
"n_commands": 0,
"n_lines": 8,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n -- restrict to the subtype where all elements are `SN`, so `flip r` is well-founded\n obtain ⟨⟨y, hsn⟩, hred : ReflTrans... | [
{
"name": "Terminating.subtype_sn",
"text": "lemma Terminating.subtype_sn (r : α → α → Prop) :\n Terminating (α := {x // SN r x}) (fun a b => r a b) :=\n iff_forall_sn.mpr fun x => x.property.onFun_of_image\n\n",
"fan_in": 1,
"n_lines": 5,
"n_chars": 172,
"n_subproofs": 0,
"n_tactics... | [
{
"name": "SN.isNormalizable",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 10,
"n_chars": 444,
"n_subproofs": 1,
"n_tactics": 7,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 4,
"automation_only": false,
"max_nest... | 1 | /-
Copyright (c) 2025 Fabrizio Montesi and Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Fabrizio Montesi, Thomas Waring, Chris Henson
-/
module
public import Cslib.Foundations.Relation.Defs
public import Mathlib.Data.List.TFAE
public import Mathlib.O... | /-
Copyright (c) 2025 Fabrizio Montesi and Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Fabrizio Montesi, Thomas Waring, Chris Henson
-/
module
public import Cslib.Foundations.Relation.Defs
public import Mathlib.Data.List.TFAE
public import Mathlib.O... | @@ -159,8 +159,19 @@
rw [iff_forall_sn] at hr ⊢
exact fun x => (hr x).of_le h
-theorem SN.isNormalizable (hx : SN r x) : Normalizable r x := sorry
+lemma Terminating.subtype_sn (r : α → α → Prop) :
+ Terminating (α := {x // SN r x}) (fun a b => r a b) :=
+ iff_forall_sn.mpr fun x => x.property.onFun_of_imag... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_849baf40dc30_5 | 66f8152e31bc35aa | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Foundations/Relation/Confluence.lean | Confluence | 5 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 15 | 1 | [
{
"theorem_name": "Terminating.isConfluent_iff_all_unique_Normal",
"depth": 1,
"n_commands": 0,
"n_lines": 21,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hn : Normalizing r := ht.isNormalizing\n constructor\n · intro hc a\n apply exists... | [
{
"name": "Normal.reflTransGen_eq",
"text": "/-- A multi-step from a normal form must be reflexive. -/\n@[grind =>]\ntheorem Normal.reflTransGen_eq (h : Normal r x) (xy : ReflTransGen r x y) : x = y := by\n induction xy <;> grind\n\n",
"fan_in": 1,
"n_lines": 6,
"n_chars": 184,
"n_subproofs... | [
{
"name": "Terminating.isConfluent_iff_all_unique_Normal",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 24,
"n_chars": 1000,
"n_subproofs": 10,
"n_tactics": 21,
"cyclomatic": 3,
"n_automation": 0,
"n_rewrites": 3,
"n_structural": 11,
"automa... | 1 | /-
Copyright (c) 2025 Fabrizio Montesi and Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Fabrizio Montesi, Thomas Waring, Chris Henson
-/
module
public import Cslib.Foundations.Relation.Defs
public import Mathlib.Data.List.TFAE
public import Mathlib.O... | /-
Copyright (c) 2025 Fabrizio Montesi and Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Fabrizio Montesi, Thomas Waring, Chris Henson
-/
module
public import Cslib.Foundations.Relation.Defs
public import Mathlib.Data.List.TFAE
public import Mathlib.O... | @@ -107,6 +107,11 @@
attribute [scoped grind →] Confluent.toChurchRosser SemiConfluent.toConfluent
+/-- A multi-step from a normal form must be reflexive. -/
+@[grind =>]
+theorem Normal.reflTransGen_eq (h : Normal r x) (xy : ReflTransGen r x y) : x = y := by
+ induction xy <;> grind
+
set_option linter.tacticAn... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_849baf40dc30_6 | 248b93fc9c2dc3d5 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Foundations/Relation/Confluence.lean | Confluence | 6 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 15 | 1 | [
{
"theorem_name": "StronglyConfluent.toConfluent",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": "\n StronglyCommute.toCommute h",
"n_chars": 30,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
... | [
{
"name": "StronglyCommute.toCommute",
"text": "theorem StronglyCommute.toCommute (h : StronglyCommute r₁ r₂) : Commute r₁ r₂ := by\n intro x y₁ y₂ x_y₁ x_y₂\n induction x_y₂ with\n | refl => exists y₁\n | @tail a b xa ab ih =>\n obtain ⟨z, y₁_z, y₂_z⟩ := ih\n obtain ⟨w, zw, bw⟩ := h.extend y₂_z a... | [
{
"name": "StronglyConfluent.toConfluent",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 4,
"n_chars": 112,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,
... | 1 | /-
Copyright (c) 2025 Fabrizio Montesi and Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Fabrizio Montesi, Thomas Waring, Chris Henson
-/
module
public import Cslib.Foundations.Relation.Defs
public import Mathlib.Data.List.TFAE
public import Mathlib.O... | /-
Copyright (c) 2025 Fabrizio Montesi and Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Fabrizio Montesi, Thomas Waring, Chris Henson
-/
module
public import Cslib.Foundations.Relation.Defs
public import Mathlib.Data.List.TFAE
public import Mathlib.O... | @@ -171,8 +171,18 @@
| refl => exact ⟨c, .refl, zw.trans (.single bc)⟩
| single bw => cases h bc bw; grind [ReflTransGen.trans]
-theorem StronglyConfluent.toConfluent (h : StronglyConfluent r) : Confluent r := sorry
+theorem StronglyCommute.toCommute (h : StronglyCommute r₁ r₂) : Commute r₁ r₂ := by
+ intr... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_6d60b1da3413_0 | c9c1eb05a6b7bd0f | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Computability/Machines/Turing/SingleTape/Deterministic.lean | Deterministic | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 3 | 1 | [
{
"theorem_name": "output_length_le_input_length_add_time",
"depth": 1,
"n_commands": 0,
"n_lines": 4,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n obtain ⟨steps, hsteps_le, hevals⟩ := h\n grind [hevals.apply_le_apply_add (Cfg.spaceUsed tm)\n ... | [
{
"name": "Cfg.spaceUsed_step",
"text": "lemma Cfg.spaceUsed_step {tm : SingleTapeTM Symbol} (cfg cfg' : tm.Cfg)\n (hstep : tm.step cfg = some cfg') : cfg'.spaceUsed ≤ cfg.spaceUsed + 1 := by\n obtain ⟨_ | q, tape⟩ := cfg\n · simp [step] at hstep\n · simp only [step] at hstep\n generalize hM : tm.t... | [
{
"name": "output_length_le_input_length_add_time",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 15,
"n_chars": 732,
"n_subproofs": 1,
"n_tactics": 4,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 1,
"automation_only":... | 1 | /-
Copyright (c) 2026 Bolton Bailey. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Bolton Bailey, Pim Spelier, Daan van Gent
-/
module
public import Cslib.Foundations.Data.BiTape
public import Cslib.Foundations.Data.RelatesInSteps
public import Mathlib.Algebra.Polyn... | /-
Copyright (c) 2026 Bolton Bailey. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Bolton Bailey, Pim Spelier, Daan van Gent
-/
module
public import Cslib.Foundations.Data.BiTape
public import Cslib.Foundations.Data.RelatesInSteps
public import Mathlib.Algebra.Polyn... | @@ -171,6 +171,18 @@
lemma Cfg.spaceUsed_haltCfg (tm : SingleTapeTM Symbol) (s : List Symbol) :
(tm.haltCfg s).spaceUsed = max 1 s.length := BiTape.spaceUsed_mk₁ s
+lemma Cfg.spaceUsed_step {tm : SingleTapeTM Symbol} (cfg cfg' : tm.Cfg)
+ (hstep : tm.step cfg = some cfg') : cfg'.spaceUsed ≤ cfg.spaceUsed + 1... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_6d60b1da3413_1 | 6e67ed18ab580c1b | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Computability/Machines/Turing/SingleTape/Deterministic.lean | Deterministic | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 3 | 1 | [
{
"theorem_name": "comp_left_relatesWithinSteps",
"depth": 1,
"n_commands": 0,
"n_lines": 10,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [initialCfg, intermediateCfg, initCfg, haltCfg] at htm1 ⊢\n refine RelatesWithinSteps.map (toCompC... | [
{
"name": "map_toCompCfg_left_step",
"text": "/-- The left converting function commutes with steps of the machines. -/\nprivate theorem map_toCompCfg_left_step (hcfg1 : cfg1.state.isSome) :\n Option.map (toCompCfg_left tm1 tm2) (tm1.step cfg1) =\n (compComputer tm1 tm2).step (toCompCfg_left tm1 tm2 ... | [
{
"name": "comp_left_relatesWithinSteps",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 28,
"n_chars": 1107,
"n_subproofs": 2,
"n_tactics": 11,
"cyclomatic": 4,
"n_automation": 3,
"n_rewrites": 1,
"n_structural": 5,
"automation_only": false,
... | 1 | /-
Copyright (c) 2026 Bolton Bailey. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Bolton Bailey, Pim Spelier, Daan van Gent
-/
module
public import Cslib.Foundations.Data.BiTape
public import Cslib.Foundations.Data.RelatesInSteps
public import Mathlib.Algebra.Polyn... | /-
Copyright (c) 2026 Bolton Bailey. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Bolton Bailey, Pim Spelier, Daan van Gent
-/
module
public import Cslib.Foundations.Data.BiTape
public import Cslib.Foundations.Data.RelatesInSteps
public import Mathlib.Algebra.Polyn... | @@ -297,6 +297,20 @@
private def finalCfg (output : List Symbol) : (compComputer tm1 tm2).Cfg :=
⟨none, BiTape.mk₁ output⟩
+/-- The left converting function commutes with steps of the machines. -/
+private theorem map_toCompCfg_left_step (hcfg1 : cfg1.state.isSome) :
+ Option.map (toCompCfg_left tm1 tm2) (tm1.... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_6d60b1da3413_2 | 82586bdf2f561bce | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Computability/Machines/Turing/SingleTape/Deterministic.lean | Deterministic | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 3 | 1 | [
{
"theorem_name": "comp_right_relatesWithinSteps",
"depth": 1,
"n_commands": 0,
"n_lines": 5,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [intermediateCfg, finalCfg, initCfg, haltCfg] at htm2 ⊢\n refine RelatesWithinSteps.map (toCompCfg... | [
{
"name": "map_toCompCfg_right_step",
"text": "/-- The right converting function commutes with steps of the machines. -/\nprivate theorem map_toCompCfg_right_step :\n Option.map (toCompCfg_right tm1 tm2) (tm2.step cfg2) =\n (compComputer tm1 tm2).step (toCompCfg_right tm1 tm2 cfg2) := by\n cases cf... | [
{
"name": "comp_right_relatesWithinSteps",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 21,
"n_chars": 754,
"n_subproofs": 0,
"n_tactics": 5,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 0,
"n_structural": 2,
"automation_only": false,
... | 1 | /-
Copyright (c) 2026 Bolton Bailey. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Bolton Bailey, Pim Spelier, Daan van Gent
-/
module
public import Cslib.Foundations.Data.BiTape
public import Cslib.Foundations.Data.RelatesInSteps
public import Mathlib.Algebra.Polyn... | /-
Copyright (c) 2026 Bolton Bailey. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Bolton Bailey, Pim Spelier, Daan van Gent
-/
module
public import Cslib.Foundations.Data.BiTape
public import Cslib.Foundations.Data.RelatesInSteps
public import Mathlib.Algebra.Polyn... | @@ -311,6 +311,21 @@
/-- A grind regression found moving to nightly-2026-03-31 (changes from lean#13166) -/
cases nextState <;> (simp_all; rfl)
+/-- The right converting function commutes with steps of the machines. -/
+private theorem map_toCompCfg_right_step :
+ Option.map (toCompCfg_right tm1 tm2)... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_d1cc42f2c8b9_0 | cb81f015fc7ac583 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Computability/Languages/ExampleEventuallyZero.lean | ExampleEventuallyZero | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 3 | 1 | [
{
"theorem_name": "extend_by_one",
"depth": 1,
"n_commands": 0,
"n_lines": 3,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n use [1]\n grind [extend_by_zero]",
"n_chars": 38,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
"n_... | [
{
"name": "extend_by_zero",
"text": "private lemma extend_by_zero (u : List (Fin 2)) :\n u ++ω const 0 ∈ eventuallyZero := by\n apply eventually_atTop.mpr\n use u.length\n grind [get_append_right']\n\n",
"fan_in": 1,
"n_lines": 7,
"n_chars": 167,
"n_subproofs": 0,
"n_tactics": 4,
... | [
{
"name": "extend_by_one",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 6,
"n_chars": 153,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": false,
"max_nesting":... | 1 | /-
Copyright (c) 2025 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Automata.NA.Basic
/-!
# An ω-regular language that is not accepted by any deterministic Buchi automaton
This example is... | /-
Copyright (c) 2025 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Automata.NA.Basic
/-!
# An ω-regular language that is not accepted by any deterministic Buchi automaton
This example is... | @@ -63,8 +63,16 @@
use (m + 1)
grind
+private lemma extend_by_zero (u : List (Fin 2)) :
+ u ++ω const 0 ∈ eventuallyZero := by
+ apply eventually_atTop.mpr
+ use u.length
+ grind [get_append_right']
+
private lemma extend_by_one (u : List (Fin 2)) :
- ∃ v, 1 ∈ v ∧ u ++ v ++ω const 0 ∈ eventual... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_d1cc42f2c8b9_1 | 3299937bb61a85a7 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Computability/Languages/ExampleEventuallyZero.lean | ExampleEventuallyZero | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 3 | 1 | [
{
"theorem_name": "extend_by_hyp",
"depth": 1,
"n_commands": 0,
"n_lines": 5,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n obtain ⟨v, _, h_pfx⟩ := extend_by_one u\n rw [← h] at h_pfx\n have := frequently_atTop.mp h_pfx (u ++ v).length\n grind [e... | [
{
"name": "extend_by_one",
"text": "private lemma extend_by_one (u : List (Fin 2)) :\n ∃ v, 1 ∈ v ∧ u ++ v ++ω const 0 ∈ eventuallyZero := by\n use [1]\n grind [extend_by_zero]\n\n",
"fan_in": 1,
"n_lines": 6,
"n_chars": 153,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
... | [
{
"name": "extend_by_hyp",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 2,
"n_lines": 8,
"n_chars": 301,
"n_subproofs": 2,
"n_tactics": 5,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 1,
"automation_only": false,
"max_nesting":... | 2 | /-
Copyright (c) 2025 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Automata.NA.Basic
/-!
# An ω-regular language that is not accepted by any deterministic Buchi automaton
This example is... | /-
Copyright (c) 2025 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Automata.NA.Basic
/-!
# An ω-regular language that is not accepted by any deterministic Buchi automaton
This example is... | @@ -69,8 +69,17 @@
use u.length
grind [get_append_right']
+private lemma extend_by_one (u : List (Fin 2)) :
+ ∃ v, 1 ∈ v ∧ u ++ v ++ω const 0 ∈ eventuallyZero := by
+ use [1]
+ grind [extend_by_zero]
+
private lemma extend_by_hyp {l : Language (Fin 2)} (h : l↗ω = eventuallyZero)
- (u : List (Fin 2)) : ... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_d1cc42f2c8b9_2 | b4b106cbc46df14a | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Computability/Languages/ExampleEventuallyZero.lean | ExampleEventuallyZero | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 3 | 1 | [
{
"theorem_name": "extend_by_hyp",
"depth": 1,
"n_commands": 0,
"n_lines": 5,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n obtain ⟨v, _, h_pfx⟩ := extend_by_one u\n rw [← h] at h_pfx\n have := frequently_atTop.mp h_pfx (u ++ v).length\n grind [e... | [
{
"name": "extend_by_one",
"text": "private lemma extend_by_one (u : List (Fin 2)) :\n ∃ v, 1 ∈ v ∧ u ++ v ++ω const 0 ∈ eventuallyZero := by\n use [1]\n grind [extend_by_zero]\n\n",
"fan_in": 1,
"n_lines": 6,
"n_chars": 153,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
... | [
{
"name": "oneSegs_lemma",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 3,
"n_lines": 12,
"n_chars": 511,
"n_subproofs": 2,
"n_tactics": 9,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 2,
"n_structural": 3,
"automation_only": false,
"max_nesting"... | 2 | /-
Copyright (c) 2025 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Automata.NA.Basic
/-!
# An ω-regular language that is not accepted by any deterministic Buchi automaton
This example is... | /-
Copyright (c) 2025 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Automata.NA.Basic
/-!
# An ω-regular language that is not accepted by any deterministic Buchi automaton
This example is... | @@ -69,8 +69,17 @@
use u.length
grind [get_append_right']
+private lemma extend_by_one (u : List (Fin 2)) :
+ ∃ v, 1 ∈ v ∧ u ++ v ++ω const 0 ∈ eventuallyZero := by
+ use [1]
+ grind [extend_by_zero]
+
private lemma extend_by_hyp {l : Language (Fin 2)} (h : l↗ω = eventuallyZero)
- (u : List (Fin 2)) : ... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_d1cc42f2c8b9_3 | 8f15e6d359e84851 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Computability/Languages/ExampleEventuallyZero.lean | ExampleEventuallyZero | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 3 | 1 | [
{
"theorem_name": "eventuallyZero_not_omegaLim",
"depth": 1,
"n_commands": 0,
"n_lines": 24,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rintro ⟨l, h⟩\n let ls := ωSequence.mk (oneSegs h)\n have h_segs := oneSegs_lemma h\n have h_pos (k : ℕ) : ... | [
{
"name": "oneSegs_lemma",
"text": "private lemma oneSegs_lemma {l : Language (Fin 2)} (h : l↗ω = eventuallyZero) (n : ℕ) :\n 1 ∈ oneSegs h n ∧ (List.ofFn (fun k : Fin (n + 1) ↦ oneSegs h k)).flatten ∈ l := by\n let P u v := 1 ∈ v ∧ u ++ v ∈ l\n have : P ((List.ofFn (fun k : Fin n ↦ oneSegs h k)).flatt... | [
{
"name": "eventuallyZero_not_omegaLim",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 4,
"n_lines": 27,
"n_chars": 1088,
"n_subproofs": 10,
"n_tactics": 24,
"cyclomatic": 3,
"n_automation": 9,
"n_rewrites": 2,
"n_structural": 8,
"automation_only": false,
... | 3 | /-
Copyright (c) 2025 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Automata.NA.Basic
/-!
# An ω-regular language that is not accepted by any deterministic Buchi automaton
This example is... | /-
Copyright (c) 2025 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Automata.NA.Basic
/-!
# An ω-regular language that is not accepted by any deterministic Buchi automaton
This example is... | @@ -84,8 +84,42 @@
private noncomputable def oneSegs {l : Language (Fin 2)} (h : l↗ω = eventuallyZero) (n : ℕ) :=
Classical.choose <| extend_by_hyp h (List.ofFn (fun k : Fin n ↦ oneSegs h k)).flatten
+private lemma oneSegs_lemma {l : Language (Fin 2)} (h : l↗ω = eventuallyZero) (n : ℕ) :
+ 1 ∈ oneSegs h n ∧ (L... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_6e323d0692fe_0 | 6342009448ad49a4 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Foundations/Semantics/LTS/Execution.lean | Execution | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 4 | 1 | [
{
"theorem_name": "Execution.to_mTr",
"depth": 1,
"n_commands": 0,
"n_lines": 16,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n induction ss generalizing s1 μs\n case nil => grind\n case cons s1' ss ih =>\n let ⟨hlen, hstart, hfinal, hexec'⟩ :=... | [
{
"name": "Execution.cons_invert",
"text": "/-- Deconstruction of executions with `List.cons`. -/\ntheorem Execution.cons_invert (h : lts.Execution s1 (μ :: μs) s2 (s1 :: ss)) :\n lts.Execution (ss[0]'(by grind)) μs s2 ss := by\n obtain ⟨_, _, _, h4⟩ := h\n exists (by grind)\n constructorm* _∧_\n · r... | [
{
"name": "Execution.to_mTr",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 21,
"n_chars": 633,
"n_subproofs": 2,
"n_tactics": 16,
"cyclomatic": 3,
"n_automation": 7,
"n_rewrites": 1,
"n_structural": 6,
"automation_only": false,
"max_nest... | 1 | /-
Copyright (c) 2026 Fabrizio Montesi. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Fabrizio Montesi, Ching-Tsun Chou
-/
module
public import Cslib.Foundations.Semantics.LTS.Basic
/-!
# Finite executions of LTS
-/
@[expose] public section
namespace Cslib.LTS
v... | /-
Copyright (c) 2026 Fabrizio Montesi. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Fabrizio Montesi, Ching-Tsun Chou
-/
module
public import Cslib.Foundations.Semantics.LTS.Basic
/-!
# Finite executions of LTS
-/
@[expose] public section
namespace Cslib.LTS
v... | @@ -39,6 +39,17 @@
theorem Execution.stepL {lts : LTS State Label} (htr : lts.Tr s1 μ s2)
(hexec : lts.Execution s2 μs s3 ss) : lts.Execution s1 (μ :: μs) s3 (s1 :: ss) := by grind
+/-- Deconstruction of executions with `List.cons`. -/
+theorem Execution.cons_invert (h : lts.Execution s1 (μ :: μs) s2 (s1 :: ss)... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_6e323d0692fe_1 | 4fb361c0906033db | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Foundations/Semantics/LTS/Execution.lean | Execution | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 4 | 1 | [
{
"theorem_name": "Execution.comp",
"depth": 1,
"n_commands": 0,
"n_lines": 13,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have h0 : (ss1 ++ ss2.tail).length = (μs1 ++ μs2).length + 1 := by grind\n use h0\n split_ands\n · grind\n · have := Ex... | [
{
"name": "Execution.comp_helper",
"text": "private lemma Execution.comp_helper\n {lts : LTS State Label} {s r t : State} {μs1 μs2 : List Label} {ss1 ss2 : List State}\n (h1 : lts.Execution s μs1 r ss1) (h2 : lts.Execution r μs2 t ss2)\n (k : ℕ) (h_k : k < ss2.length) :\n (ss1 ++ ss2.tail)[μs1.l... | [
{
"name": "Execution.comp",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 19,
"n_chars": 797,
"n_subproofs": 4,
"n_tactics": 13,
"cyclomatic": 1,
"n_automation": 5,
"n_rewrites": 0,
"n_structural": 2,
"automation_only": false,
"max_nestin... | 1 | /-
Copyright (c) 2026 Fabrizio Montesi. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Fabrizio Montesi, Ching-Tsun Chou
-/
module
public import Cslib.Foundations.Semantics.LTS.Basic
/-!
# Finite executions of LTS
-/
@[expose] public section
namespace Cslib.LTS
v... | /-
Copyright (c) 2026 Fabrizio Montesi. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Fabrizio Montesi, Ching-Tsun Chou
-/
module
public import Cslib.Foundations.Semantics.LTS.Basic
/-!
# Finite executions of LTS
-/
@[expose] public section
namespace Cslib.LTS
v... | @@ -91,6 +91,18 @@
lts.MTr s1 μs s2 ↔ ∃ ss : List State, lts.Execution s1 μs s2 ss := by
grind
+private lemma Execution.comp_helper
+ {lts : LTS State Label} {s r t : State} {μs1 μs2 : List Label} {ss1 ss2 : List State}
+ (h1 : lts.Execution s μs1 r ss1) (h2 : lts.Execution r μs2 t ss2)
+ (k : ℕ) (h_... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_8a2badbcc20b_0 | 74924f70c2b2996a | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Computability/Automata/NA/BuchiEquiv.lean | BuchiEquiv | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 1 | 2 | [
{
"theorem_name": "reindex_run_iff'",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp [reindex_run_iff]",
"n_chars": 28,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automati... | [
{
"name": "reindex_run_iff",
"text": "theorem reindex_run_iff {f : State ≃ State'} {nba : Buchi State Symbol}\n {xs : ωSequence Symbol} {ss' : ωSequence State'} :\n (nba.reindex f).Run xs ss' ↔ nba.Run xs (ss'.map f.symm) := by\n constructor\n · rintro ⟨h_init, h_next⟩\n exact ⟨mem_image_equiv.mp... | [
{
"name": "reindex_run_iff'",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 7,
"n_chars": 226,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,
"max_nesting... | 1 | /-
Copyright (c) 2025 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Automata.NA.Basic
/-! # Equivalence of nondeterministic Buchi automata (NBAs). -/
@[expose] public section
universe u ... | /-
Copyright (c) 2025 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Computability.Automata.NA.Basic
/-! # Equivalence of nondeterministic Buchi automata (NBAs). -/
@[expose] public section
universe u ... | @@ -37,10 +37,20 @@
left_inv nba := by simp
right_inv nba' := by simp
+theorem reindex_run_iff {f : State ≃ State'} {nba : Buchi State Symbol}
+ {xs : ωSequence Symbol} {ss' : ωSequence State'} :
+ (nba.reindex f).Run xs ss' ↔ nba.Run xs (ss'.map f.symm) := by
+ constructor
+ · rintro ⟨h_init, h_next⟩
+... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_154d6b878631_0 | f328935c7589c4ae | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Languages/CombinatoryLogic/Recursion.lean | Recursion | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 31 | 12 | [
{
"theorem_name": "isChurchPair_trans",
"depth": 1,
"n_commands": 0,
"n_lines": 10,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp_rw [IsChurchPair]\n intro ⟨ha₁,ha₂⟩\n constructor\n · apply isChurch_trans (a' := Fst ⬝ a')\n · apply MRed.t... | [
{
"name": "isChurch_trans",
"text": "/-- To show `IsChurch n a` it suffices to show the same for a reduct of `a`. -/\ntheorem isChurch_trans (n : Nat) {a a' : SKI} (h : a ↠ a') :\n IsChurch n a' → IsChurch n a := by\n simp_rw [IsChurch]\n intro ha' f x\n calc\n _ ↠ a' ⬝ f ⬝ x := by apply MRed.head; a... | [
{
"name": "isChurchPair_trans",
"fan_in": 2,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 13,
"n_chars": 384,
"n_subproofs": 0,
"n_tactics": 12,
"cyclomatic": 2,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 10,
"automation_only": false,
"max_n... | 1 | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | @@ -78,6 +78,17 @@
def IsChurch (n : Nat) (a : SKI) : Prop :=
∀ f x :SKI, (a ⬝ f ⬝ x) ↠ (Church n f x)
+/-- To show `IsChurch n a` it suffices to show the same for a reduct of `a`. -/
+theorem isChurch_trans (n : Nat) {a a' : SKI} (h : a ↠ a') :
+ IsChurch n a' → IsChurch n a := by
+ simp_rw [IsChurch]
+ i... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_154d6b878631_1 | 03f9877b6b7c5816 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Languages/CombinatoryLogic/Recursion.lean | Recursion | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 31 | 12 | [
{
"theorem_name": "isChurchPair_trans",
"depth": 1,
"n_commands": 0,
"n_lines": 10,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp_rw [IsChurchPair]\n intro ⟨ha₁,ha₂⟩\n constructor\n · apply isChurch_trans (a' := Fst ⬝ a')\n · apply MRed.t... | [
{
"name": "isChurch_trans",
"text": "/-- To show `IsChurch n a` it suffices to show the same for a reduct of `a`. -/\ntheorem isChurch_trans (n : Nat) {a a' : SKI} (h : a ↠ a') :\n IsChurch n a' → IsChurch n a := by\n simp_rw [IsChurch]\n intro ha' f x\n calc\n _ ↠ a' ⬝ f ⬝ x := by apply MRed.head; a... | [
{
"name": "predAux_correct",
"fan_in": 1,
"n_deps_direct": 4,
"n_deps_transitive": 4,
"n_lines": 9,
"n_chars": 412,
"n_subproofs": 0,
"n_tactics": 6,
"cyclomatic": 2,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 5,
"automation_only": false,
"max_nesting... | 3 | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | @@ -78,6 +78,17 @@
def IsChurch (n : Nat) (a : SKI) : Prop :=
∀ f x :SKI, (a ⬝ f ⬝ x) ↠ (Church n f x)
+/-- To show `IsChurch n a` it suffices to show the same for a reduct of `a`. -/
+theorem isChurch_trans (n : Nat) {a a' : SKI} (h : a ↠ a') :
+ IsChurch n a' → IsChurch n a := by
+ simp_rw [IsChurch]
+ i... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_154d6b878631_2 | 789cb3ec03c13724 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Languages/CombinatoryLogic/Recursion.lean | Recursion | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 31 | 12 | [
{
"theorem_name": "isChurchPair_trans",
"depth": 1,
"n_commands": 0,
"n_lines": 10,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp_rw [IsChurchPair]\n intro ⟨ha₁,ha₂⟩\n constructor\n · apply isChurch_trans (a' := Fst ⬝ a')\n · apply MRed.t... | [
{
"name": "isChurch_trans",
"text": "/-- To show `IsChurch n a` it suffices to show the same for a reduct of `a`. -/\ntheorem isChurch_trans (n : Nat) {a a' : SKI} (h : a ↠ a') :\n IsChurch n a' → IsChurch n a := by\n simp_rw [IsChurch]\n intro ha' f x\n calc\n _ ↠ a' ⬝ f ⬝ x := by apply MRed.head; a... | [
{
"name": "predAux_correct'",
"fan_in": 1,
"n_deps_direct": 5,
"n_deps_transitive": 7,
"n_lines": 15,
"n_chars": 573,
"n_subproofs": 0,
"n_tactics": 12,
"cyclomatic": 4,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 7,
"automation_only": false,
"max_nest... | 4 | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | @@ -78,6 +78,17 @@
def IsChurch (n : Nat) (a : SKI) : Prop :=
∀ f x :SKI, (a ⬝ f ⬝ x) ↠ (Church n f x)
+/-- To show `IsChurch n a` it suffices to show the same for a reduct of `a`. -/
+theorem isChurch_trans (n : Nat) {a a' : SKI} (h : a ↠ a') :
+ IsChurch n a' → IsChurch n a := by
+ simp_rw [IsChurch]
+ i... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_154d6b878631_3 | 818fb998a226a0cb | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Languages/CombinatoryLogic/Recursion.lean | Recursion | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 31 | 12 | [
{
"theorem_name": "isChurchPair_trans",
"depth": 1,
"n_commands": 0,
"n_lines": 10,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp_rw [IsChurchPair]\n intro ⟨ha₁,ha₂⟩\n constructor\n · apply isChurch_trans (a' := Fst ⬝ a')\n · apply MRed.t... | [
{
"name": "isChurch_trans",
"text": "/-- To show `IsChurch n a` it suffices to show the same for a reduct of `a`. -/\ntheorem isChurch_trans (n : Nat) {a a' : SKI} (h : a ↠ a') :\n IsChurch n a' → IsChurch n a := by\n simp_rw [IsChurch]\n intro ha' f x\n calc\n _ ↠ a' ⬝ f ⬝ x := by apply MRed.head; a... | [
{
"name": "pred_correct",
"fan_in": 1,
"n_deps_direct": 3,
"n_deps_transitive": 9,
"n_lines": 12,
"n_chars": 356,
"n_subproofs": 0,
"n_tactics": 7,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 5,
"automation_only": false,
"max_nesting":... | 6 | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | @@ -78,6 +78,17 @@
def IsChurch (n : Nat) (a : SKI) : Prop :=
∀ f x :SKI, (a ⬝ f ⬝ x) ↠ (Church n f x)
+/-- To show `IsChurch n a` it suffices to show the same for a reduct of `a`. -/
+theorem isChurch_trans (n : Nat) {a a' : SKI} (h : a ↠ a') :
+ IsChurch n a' → IsChurch n a := by
+ simp_rw [IsChurch]
+ i... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_154d6b878631_4 | a134e16b349cc146 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Languages/CombinatoryLogic/Recursion.lean | Recursion | 4 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 31 | 1 | [
{
"theorem_name": "isZero_correct",
"depth": 1,
"n_commands": 0,
"n_lines": 16,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n apply isBool_trans (a' := a ⬝ (K ⬝ FF) ⬝ TT) (h := isZero_def a)\n by_cases n=0\n case pos h0 =>\n simp_rw [h0]\n r... | [
{
"name": "isZero_def",
"text": "theorem isZero_def (a : SKI) : (IsZero ⬝ a) ↠ a ⬝ (K ⬝ FF) ⬝ TT :=\n IsZeroPoly.toSKI_correct [a] (by simp)\n",
"fan_in": 1,
"n_lines": 3,
"n_chars": 118,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
... | [
{
"name": "isZero_correct",
"fan_in": 5,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 20,
"n_chars": 545,
"n_subproofs": 0,
"n_tactics": 16,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 2,
"n_structural": 5,
"automation_only": false,
"max_nestin... | 1 | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | @@ -143,8 +143,25 @@
def IsZeroPoly : SKI.Polynomial 1 := &0 ⬝' (K ⬝ FF) ⬝' TT
/-- A term representing IsZero -/
def IsZero : SKI := IsZeroPoly.toSKI
+theorem isZero_def (a : SKI) : (IsZero ⬝ a) ↠ a ⬝ (K ⬝ FF) ⬝ TT :=
+ IsZeroPoly.toSKI_correct [a] (by simp)
theorem isZero_correct (n : Nat) (a : SKI) (h : IsChurch... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_154d6b878631_5 | 5f2bf8a455a6287a | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Languages/CombinatoryLogic/Recursion.lean | Recursion | 5 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 31 | 1 | [
{
"theorem_name": "rec_def",
"depth": 1,
"n_commands": 0,
"n_lines": 5,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " calc\n _ ↠ RecAux ⬝ Rec ⬝ x ⬝ g ⬝ a := by\n apply MRed.head; apply MRed.head; apply MRed.head\n apply fixedPoint_correct\n _ ... | [
{
"name": "recAux_def",
"text": "theorem recAux_def (R₀ x g a : SKI) :\n (RecAux ⬝ R₀ ⬝ x ⬝ g ⬝ a) ↠\n SKI.Cond ⬝ x ⬝ (g ⬝ a ⬝ (R₀ ⬝ x ⬝ g ⬝ (Pred ⬝ a))) ⬝ (IsZero ⬝ a) :=\n RecAuxPoly.toSKI_correct [R₀, x, g, a] (by simp)\n\n",
"fan_in": 1,
"n_lines": 6,
"n_chars": 236,
"n_subproo... | [
{
"name": "rec_def",
"fan_in": 2,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 8,
"n_chars": 413,
"n_subproofs": 0,
"n_tactics": 7,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 5,
"automation_only": false,
"max_nesting": 6
}... | 1 | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | @@ -151,13 +151,22 @@
SKI.Cond ⬝' &1 ⬝' (&2 ⬝' &3 ⬝' (&0 ⬝' &1 ⬝' &2 ⬝' (Pred ⬝' &3))) ⬝' (IsZero ⬝' &3)
/-- A term representing RecAux -/
def RecAux : SKI := RecAuxPoly.toSKI
+theorem recAux_def (R₀ x g a : SKI) :
+ (RecAux ⬝ R₀ ⬝ x ⬝ g ⬝ a) ↠
+ SKI.Cond ⬝ x ⬝ (g ⬝ a ⬝ (R₀ ⬝ x ⬝ g ⬝ (Pred ⬝ a))) ⬝ (IsZero... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_154d6b878631_6 | d5ca6b6a672b8bb0 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Languages/CombinatoryLogic/Recursion.lean | Recursion | 6 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 31 | 5 | [
{
"theorem_name": "rec_zero",
"depth": 1,
"n_commands": 0,
"n_lines": 6,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n calc\n _ ↠ SKI.Cond ⬝ x ⬝ (g ⬝ a ⬝ (Rec ⬝ x ⬝ g ⬝ (Pred ⬝ a))) ⬝ (IsZero ⬝ a) := rec_def _ _ _\n _ ↠ if (Nat.beq 0 0) then x els... | [
{
"name": "isZero_correct",
"text": "theorem isZero_correct (n : Nat) (a : SKI) (h : IsChurch n a) :\n IsBool (n = 0) (IsZero ⬝ a) := by\n apply isBool_trans (a' := a ⬝ (K ⬝ FF) ⬝ TT) (h := isZero_def a)\n by_cases n=0\n case pos h0 =>\n simp_rw [h0]\n rw [h0] at h\n apply isBool_trans (ha' :... | [
{
"name": "rec_zero",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 4,
"n_lines": 8,
"n_chars": 360,
"n_subproofs": 0,
"n_tactics": 6,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 3,
"automation_only": false,
"max_nesting": 6
... | 4 | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | @@ -145,6 +145,24 @@
def IsZero : SKI := IsZeroPoly.toSKI
theorem isZero_def (a : SKI) : (IsZero ⬝ a) ↠ a ⬝ (K ⬝ FF) ⬝ TT :=
IsZeroPoly.toSKI_correct [a] (by simp)
+theorem isZero_correct (n : Nat) (a : SKI) (h : IsChurch n a) :
+ IsBool (n = 0) (IsZero ⬝ a) := by
+ apply isBool_trans (a' := a ⬝ (K ⬝ FF) ⬝ TT)... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_154d6b878631_7 | 8c3b53c1461cd51c | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Languages/CombinatoryLogic/Recursion.lean | Recursion | 7 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 31 | 5 | [
{
"theorem_name": "rec_zero",
"depth": 1,
"n_commands": 0,
"n_lines": 6,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n calc\n _ ↠ SKI.Cond ⬝ x ⬝ (g ⬝ a ⬝ (Rec ⬝ x ⬝ g ⬝ (Pred ⬝ a))) ⬝ (IsZero ⬝ a) := rec_def _ _ _\n _ ↠ if (Nat.beq 0 0) then x els... | [
{
"name": "isZero_correct",
"text": "theorem isZero_correct (n : Nat) (a : SKI) (h : IsChurch n a) :\n IsBool (n = 0) (IsZero ⬝ a) := by\n apply isBool_trans (a' := a ⬝ (K ⬝ FF) ⬝ TT) (h := isZero_def a)\n by_cases n=0\n case pos h0 =>\n simp_rw [h0]\n rw [h0] at h\n apply isBool_trans (ha' :... | [
{
"name": "rec_succ",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 4,
"n_lines": 12,
"n_chars": 474,
"n_subproofs": 0,
"n_tactics": 6,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 3,
"automation_only": false,
"max_nesting": 6
... | 4 | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | @@ -145,6 +145,24 @@
def IsZero : SKI := IsZeroPoly.toSKI
theorem isZero_def (a : SKI) : (IsZero ⬝ a) ↠ a ⬝ (K ⬝ FF) ⬝ TT :=
IsZeroPoly.toSKI_correct [a] (by simp)
+theorem isZero_correct (n : Nat) (a : SKI) (h : IsChurch n a) :
+ IsBool (n = 0) (IsZero ⬝ a) := by
+ apply isBool_trans (a' := a ⬝ (K ⬝ FF) ⬝ TT)... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_154d6b878631_8 | b2492137523b67a8 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Languages/CombinatoryLogic/Recursion.lean | Recursion | 8 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 31 | 5 | [
{
"theorem_name": "rec_zero",
"depth": 1,
"n_commands": 0,
"n_lines": 6,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n calc\n _ ↠ SKI.Cond ⬝ x ⬝ (g ⬝ a ⬝ (Rec ⬝ x ⬝ g ⬝ (Pred ⬝ a))) ⬝ (IsZero ⬝ a) := rec_def _ _ _\n _ ↠ if (Nat.beq 0 0) then x els... | [
{
"name": "isZero_correct",
"text": "theorem isZero_correct (n : Nat) (a : SKI) (h : IsChurch n a) :\n IsBool (n = 0) (IsZero ⬝ a) := by\n apply isBool_trans (a' := a ⬝ (K ⬝ FF) ⬝ TT) (h := isZero_def a)\n by_cases n=0\n case pos h0 =>\n simp_rw [h0]\n rw [h0] at h\n apply isBool_trans (ha' :... | [
{
"name": "rfindAboveAux_base",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 3,
"n_lines": 7,
"n_chars": 382,
"n_subproofs": 0,
"n_tactics": 5,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 3,
"automation_only": false,
"max_nest... | 3 | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | @@ -145,6 +145,24 @@
def IsZero : SKI := IsZeroPoly.toSKI
theorem isZero_def (a : SKI) : (IsZero ⬝ a) ↠ a ⬝ (K ⬝ FF) ⬝ TT :=
IsZeroPoly.toSKI_correct [a] (by simp)
+theorem isZero_correct (n : Nat) (a : SKI) (h : IsChurch n a) :
+ IsBool (n = 0) (IsZero ⬝ a) := by
+ apply isBool_trans (a' := a ⬝ (K ⬝ FF) ⬝ TT)... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_154d6b878631_9 | 8dbdf37640ef2ac1 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Languages/CombinatoryLogic/Recursion.lean | Recursion | 9 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 31 | 5 | [
{
"theorem_name": "rec_zero",
"depth": 1,
"n_commands": 0,
"n_lines": 6,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n calc\n _ ↠ SKI.Cond ⬝ x ⬝ (g ⬝ a ⬝ (Rec ⬝ x ⬝ g ⬝ (Pred ⬝ a))) ⬝ (IsZero ⬝ a) := rec_def _ _ _\n _ ↠ if (Nat.beq 0 0) then x els... | [
{
"name": "isZero_correct",
"text": "theorem isZero_correct (n : Nat) (a : SKI) (h : IsChurch n a) :\n IsBool (n = 0) (IsZero ⬝ a) := by\n apply isBool_trans (a' := a ⬝ (K ⬝ FF) ⬝ TT) (h := isZero_def a)\n by_cases n=0\n case pos h0 =>\n simp_rw [h0]\n rw [h0] at h\n apply isBool_trans (ha' :... | [
{
"name": "rfindAboveAux_step",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 3,
"n_lines": 8,
"n_chars": 433,
"n_subproofs": 0,
"n_tactics": 5,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 3,
"automation_only": false,
"max_nest... | 3 | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | @@ -145,6 +145,24 @@
def IsZero : SKI := IsZeroPoly.toSKI
theorem isZero_def (a : SKI) : (IsZero ⬝ a) ↠ a ⬝ (K ⬝ FF) ⬝ TT :=
IsZeroPoly.toSKI_correct [a] (by simp)
+theorem isZero_correct (n : Nat) (a : SKI) (h : IsChurch n a) :
+ IsBool (n = 0) (IsZero ⬝ a) := by
+ apply isBool_trans (a' := a ⬝ (K ⬝ FF) ⬝ TT)... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_154d6b878631_10 | 4fb5281bb0576ae4 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Languages/CombinatoryLogic/Recursion.lean | Recursion | 10 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 31 | 12 | [
{
"theorem_name": "isChurchPair_trans",
"depth": 1,
"n_commands": 0,
"n_lines": 10,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp_rw [IsChurchPair]\n intro ⟨ha₁,ha₂⟩\n constructor\n · apply isChurch_trans (a' := Fst ⬝ a')\n · apply MRed.t... | [
{
"name": "isChurch_trans",
"text": "/-- To show `IsChurch n a` it suffices to show the same for a reduct of `a`. -/\ntheorem isChurch_trans (n : Nat) {a a' : SKI} (h : a ↠ a') :\n IsChurch n a' → IsChurch n a := by\n simp_rw [IsChurch]\n intro ha' f x\n calc\n _ ↠ a' ⬝ f ⬝ x := by apply MRed.head; a... | [
{
"name": "RFindAbove_correct",
"fan_in": 1,
"n_deps_direct": 4,
"n_deps_transitive": 7,
"n_lines": 24,
"n_chars": 1024,
"n_subproofs": 1,
"n_tactics": 20,
"cyclomatic": 3,
"n_automation": 4,
"n_rewrites": 1,
"n_structural": 9,
"automation_only": false,
"max_n... | 6 | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | @@ -78,6 +78,17 @@
def IsChurch (n : Nat) (a : SKI) : Prop :=
∀ f x :SKI, (a ⬝ f ⬝ x) ↠ (Church n f x)
+/-- To show `IsChurch n a` it suffices to show the same for a reduct of `a`. -/
+theorem isChurch_trans (n : Nat) {a a' : SKI} (h : a ↠ a') :
+ IsChurch n a' → IsChurch n a := by
+ simp_rw [IsChurch]
+ i... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_154d6b878631_11 | 0887cdeda54a747c | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Languages/CombinatoryLogic/Recursion.lean | Recursion | 11 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 31 | 12 | [
{
"theorem_name": "isChurchPair_trans",
"depth": 1,
"n_commands": 0,
"n_lines": 10,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp_rw [IsChurchPair]\n intro ⟨ha₁,ha₂⟩\n constructor\n · apply isChurch_trans (a' := Fst ⬝ a')\n · apply MRed.t... | [
{
"name": "isChurch_trans",
"text": "/-- To show `IsChurch n a` it suffices to show the same for a reduct of `a`. -/\ntheorem isChurch_trans (n : Nat) {a a' : SKI} (h : a ↠ a') :\n IsChurch n a' → IsChurch n a := by\n simp_rw [IsChurch]\n intro ha' f x\n calc\n _ ↠ a' ⬝ f ⬝ x := by apply MRed.head; a... | [
{
"name": "RFind_correct",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 9,
"n_lines": 12,
"n_chars": 422,
"n_subproofs": 1,
"n_tactics": 4,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": false,
"max_nesting"... | 7 | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | @@ -78,6 +78,17 @@
def IsChurch (n : Nat) (a : SKI) : Prop :=
∀ f x :SKI, (a ⬝ f ⬝ x) ↠ (Church n f x)
+/-- To show `IsChurch n a` it suffices to show the same for a reduct of `a`. -/
+theorem isChurch_trans (n : Nat) {a a' : SKI} (h : a ↠ a') :
+ IsChurch n a' → IsChurch n a := by
+ simp_rw [IsChurch]
+ i... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_154d6b878631_12 | e406d5827536182c | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Languages/CombinatoryLogic/Recursion.lean | Recursion | 12 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 31 | 12 | [
{
"theorem_name": "isChurchPair_trans",
"depth": 1,
"n_commands": 0,
"n_lines": 10,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp_rw [IsChurchPair]\n intro ⟨ha₁,ha₂⟩\n constructor\n · apply isChurch_trans (a' := Fst ⬝ a')\n · apply MRed.t... | [
{
"name": "isChurch_trans",
"text": "/-- To show `IsChurch n a` it suffices to show the same for a reduct of `a`. -/\ntheorem isChurch_trans (n : Nat) {a a' : SKI} (h : a ↠ a') :\n IsChurch n a' → IsChurch n a := by\n simp_rw [IsChurch]\n intro ha' f x\n calc\n _ ↠ a' ⬝ f ⬝ x := by apply MRed.head; a... | [
{
"name": "add_correct",
"fan_in": 2,
"n_deps_direct": 3,
"n_deps_transitive": 3,
"n_lines": 14,
"n_chars": 497,
"n_subproofs": 0,
"n_tactics": 12,
"cyclomatic": 2,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 5,
"automation_only": false,
"max_nesting":... | 2 | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | @@ -78,6 +78,17 @@
def IsChurch (n : Nat) (a : SKI) : Prop :=
∀ f x :SKI, (a ⬝ f ⬝ x) ↠ (Church n f x)
+/-- To show `IsChurch n a` it suffices to show the same for a reduct of `a`. -/
+theorem isChurch_trans (n : Nat) {a a' : SKI} (h : a ↠ a') :
+ IsChurch n a' → IsChurch n a := by
+ simp_rw [IsChurch]
+ i... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_154d6b878631_13 | 1ac84503a9225d62 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Languages/CombinatoryLogic/Recursion.lean | Recursion | 13 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 31 | 12 | [
{
"theorem_name": "isChurchPair_trans",
"depth": 1,
"n_commands": 0,
"n_lines": 10,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp_rw [IsChurchPair]\n intro ⟨ha₁,ha₂⟩\n constructor\n · apply isChurch_trans (a' := Fst ⬝ a')\n · apply MRed.t... | [
{
"name": "isChurch_trans",
"text": "/-- To show `IsChurch n a` it suffices to show the same for a reduct of `a`. -/\ntheorem isChurch_trans (n : Nat) {a a' : SKI} (h : a ↠ a') :\n IsChurch n a' → IsChurch n a := by\n simp_rw [IsChurch]\n intro ha' f x\n calc\n _ ↠ a' ⬝ f ⬝ x := by apply MRed.head; a... | [
{
"name": "mul_correct",
"fan_in": 3,
"n_deps_direct": 4,
"n_deps_transitive": 6,
"n_lines": 12,
"n_chars": 551,
"n_subproofs": 0,
"n_tactics": 10,
"cyclomatic": 2,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 5,
"automation_only": false,
"max_nesting":... | 4 | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | @@ -78,6 +78,17 @@
def IsChurch (n : Nat) (a : SKI) : Prop :=
∀ f x :SKI, (a ⬝ f ⬝ x) ↠ (Church n f x)
+/-- To show `IsChurch n a` it suffices to show the same for a reduct of `a`. -/
+theorem isChurch_trans (n : Nat) {a a' : SKI} (h : a ↠ a') :
+ IsChurch n a' → IsChurch n a := by
+ simp_rw [IsChurch]
+ i... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_154d6b878631_14 | a0eef236a4754cc9 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Languages/CombinatoryLogic/Recursion.lean | Recursion | 14 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 31 | 12 | [
{
"theorem_name": "isChurchPair_trans",
"depth": 1,
"n_commands": 0,
"n_lines": 10,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp_rw [IsChurchPair]\n intro ⟨ha₁,ha₂⟩\n constructor\n · apply isChurch_trans (a' := Fst ⬝ a')\n · apply MRed.t... | [
{
"name": "isChurch_trans",
"text": "/-- To show `IsChurch n a` it suffices to show the same for a reduct of `a`. -/\ntheorem isChurch_trans (n : Nat) {a a' : SKI} (h : a ↠ a') :\n IsChurch n a' → IsChurch n a := by\n simp_rw [IsChurch]\n intro ha' f x\n calc\n _ ↠ a' ⬝ f ⬝ x := by apply MRed.head; a... | [
{
"name": "sub_correct",
"fan_in": 3,
"n_deps_direct": 3,
"n_deps_transitive": 11,
"n_lines": 14,
"n_chars": 477,
"n_subproofs": 0,
"n_tactics": 12,
"cyclomatic": 2,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 5,
"automation_only": false,
"max_nesting"... | 8 | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | @@ -78,6 +78,17 @@
def IsChurch (n : Nat) (a : SKI) : Prop :=
∀ f x :SKI, (a ⬝ f ⬝ x) ↠ (Church n f x)
+/-- To show `IsChurch n a` it suffices to show the same for a reduct of `a`. -/
+theorem isChurch_trans (n : Nat) {a a' : SKI} (h : a ↠ a') :
+ IsChurch n a' → IsChurch n a := by
+ simp_rw [IsChurch]
+ i... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_154d6b878631_15 | 491210f89e0ef61b | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Languages/CombinatoryLogic/Recursion.lean | Recursion | 15 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 31 | 12 | [
{
"theorem_name": "isChurchPair_trans",
"depth": 1,
"n_commands": 0,
"n_lines": 10,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp_rw [IsChurchPair]\n intro ⟨ha₁,ha₂⟩\n constructor\n · apply isChurch_trans (a' := Fst ⬝ a')\n · apply MRed.t... | [
{
"name": "isChurch_trans",
"text": "/-- To show `IsChurch n a` it suffices to show the same for a reduct of `a`. -/\ntheorem isChurch_trans (n : Nat) {a a' : SKI} (h : a ↠ a') :\n IsChurch n a' → IsChurch n a := by\n simp_rw [IsChurch]\n intro ha' f x\n calc\n _ ↠ a' ⬝ f ⬝ x := by apply MRed.head; a... | [
{
"name": "le_correct",
"fan_in": 4,
"n_deps_direct": 3,
"n_deps_transitive": 15,
"n_lines": 10,
"n_chars": 369,
"n_subproofs": 0,
"n_tactics": 6,
"cyclomatic": 2,
"n_automation": 2,
"n_rewrites": 0,
"n_structural": 3,
"automation_only": false,
"max_nesting": ... | 12 | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | @@ -78,6 +78,17 @@
def IsChurch (n : Nat) (a : SKI) : Prop :=
∀ f x :SKI, (a ⬝ f ⬝ x) ↠ (Church n f x)
+/-- To show `IsChurch n a` it suffices to show the same for a reduct of `a`. -/
+theorem isChurch_trans (n : Nat) {a a' : SKI} (h : a ↠ a') :
+ IsChurch n a' → IsChurch n a := by
+ simp_rw [IsChurch]
+ i... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_154d6b878631_16 | 032cbf66929e499e | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Languages/CombinatoryLogic/Recursion.lean | Recursion | 16 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 31 | 12 | [
{
"theorem_name": "isChurchPair_trans",
"depth": 1,
"n_commands": 0,
"n_lines": 10,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp_rw [IsChurchPair]\n intro ⟨ha₁,ha₂⟩\n constructor\n · apply isChurch_trans (a' := Fst ⬝ a')\n · apply MRed.t... | [
{
"name": "isChurch_trans",
"text": "/-- To show `IsChurch n a` it suffices to show the same for a reduct of `a`. -/\ntheorem isChurch_trans (n : Nat) {a a' : SKI} (h : a ↠ a') :\n IsChurch n a' → IsChurch n a := by\n simp_rw [IsChurch]\n intro ha' f x\n calc\n _ ↠ a' ⬝ f ⬝ x := by apply MRed.head; a... | [
{
"name": "sqrt_correct",
"fan_in": 1,
"n_deps_direct": 7,
"n_deps_transitive": 27,
"n_lines": 21,
"n_chars": 792,
"n_subproofs": 3,
"n_tactics": 15,
"cyclomatic": 1,
"n_automation": 3,
"n_rewrites": 0,
"n_structural": 5,
"automation_only": false,
"max_nesting... | 24 | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | @@ -78,6 +78,17 @@
def IsChurch (n : Nat) (a : SKI) : Prop :=
∀ f x :SKI, (a ⬝ f ⬝ x) ↠ (Church n f x)
+/-- To show `IsChurch n a` it suffices to show the same for a reduct of `a`. -/
+theorem isChurch_trans (n : Nat) {a a' : SKI} (h : a ↠ a') :
+ IsChurch n a' → IsChurch n a := by
+ simp_rw [IsChurch]
+ i... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_154d6b878631_17 | 4f09bf67327058bb | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Languages/CombinatoryLogic/Recursion.lean | Recursion | 17 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 31 | 12 | [
{
"theorem_name": "isChurchPair_trans",
"depth": 1,
"n_commands": 0,
"n_lines": 10,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp_rw [IsChurchPair]\n intro ⟨ha₁,ha₂⟩\n constructor\n · apply isChurch_trans (a' := Fst ⬝ a')\n · apply MRed.t... | [
{
"name": "isChurch_trans",
"text": "/-- To show `IsChurch n a` it suffices to show the same for a reduct of `a`. -/\ntheorem isChurch_trans (n : Nat) {a a' : SKI} (h : a ↠ a') :\n IsChurch n a' → IsChurch n a := by\n simp_rw [IsChurch]\n intro ha' f x\n calc\n _ ↠ a' ⬝ f ⬝ x := by apply MRed.head; a... | [
{
"name": "natPair_correct",
"fan_in": 0,
"n_deps_direct": 5,
"n_deps_transitive": 21,
"n_lines": 15,
"n_chars": 608,
"n_subproofs": 1,
"n_tactics": 8,
"cyclomatic": 1,
"n_automation": 3,
"n_rewrites": 0,
"n_structural": 2,
"automation_only": false,
"max_nesti... | 18 | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | @@ -78,6 +78,17 @@
def IsChurch (n : Nat) (a : SKI) : Prop :=
∀ f x :SKI, (a ⬝ f ⬝ x) ↠ (Church n f x)
+/-- To show `IsChurch n a` it suffices to show the same for a reduct of `a`. -/
+theorem isChurch_trans (n : Nat) {a a' : SKI} (h : a ↠ a') :
+ IsChurch n a' → IsChurch n a := by
+ simp_rw [IsChurch]
+ i... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_154d6b878631_18 | 2e6d23fb0ff71560 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Languages/CombinatoryLogic/Recursion.lean | Recursion | 18 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 31 | 12 | [
{
"theorem_name": "isChurchPair_trans",
"depth": 1,
"n_commands": 0,
"n_lines": 10,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp_rw [IsChurchPair]\n intro ⟨ha₁,ha₂⟩\n constructor\n · apply isChurch_trans (a' := Fst ⬝ a')\n · apply MRed.t... | [
{
"name": "isChurch_trans",
"text": "/-- To show `IsChurch n a` it suffices to show the same for a reduct of `a`. -/\ntheorem isChurch_trans (n : Nat) {a a' : SKI} (h : a ↠ a') :\n IsChurch n a' → IsChurch n a := by\n simp_rw [IsChurch]\n intro ha' f x\n calc\n _ ↠ a' ⬝ f ⬝ x := by apply MRed.head; a... | [
{
"name": "natUnpair_church",
"fan_in": 2,
"n_deps_direct": 3,
"n_deps_transitive": 28,
"n_lines": 9,
"n_chars": 438,
"n_subproofs": 1,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": false,
"max_nesti... | 25 | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | @@ -78,6 +78,17 @@
def IsChurch (n : Nat) (a : SKI) : Prop :=
∀ f x :SKI, (a ⬝ f ⬝ x) ↠ (Church n f x)
+/-- To show `IsChurch n a` it suffices to show the same for a reduct of `a`. -/
+theorem isChurch_trans (n : Nat) {a a' : SKI} (h : a ↠ a') :
+ IsChurch n a' → IsChurch n a := by
+ simp_rw [IsChurch]
+ i... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_154d6b878631_19 | 9d96881c3d7b2fcb | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Languages/CombinatoryLogic/Recursion.lean | Recursion | 19 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 31 | 12 | [
{
"theorem_name": "isChurchPair_trans",
"depth": 1,
"n_commands": 0,
"n_lines": 10,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp_rw [IsChurchPair]\n intro ⟨ha₁,ha₂⟩\n constructor\n · apply isChurch_trans (a' := Fst ⬝ a')\n · apply MRed.t... | [
{
"name": "isChurch_trans",
"text": "/-- To show `IsChurch n a` it suffices to show the same for a reduct of `a`. -/\ntheorem isChurch_trans (n : Nat) {a a' : SKI} (h : a ↠ a') :\n IsChurch n a' → IsChurch n a := by\n simp_rw [IsChurch]\n intro ha' f x\n calc\n _ ↠ a' ⬝ f ⬝ x := by apply MRed.head; a... | [
{
"name": "natUnpairLeft_correct",
"fan_in": 0,
"n_deps_direct": 4,
"n_deps_transitive": 30,
"n_lines": 10,
"n_chars": 494,
"n_subproofs": 2,
"n_tactics": 7,
"cyclomatic": 2,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 3,
"automation_only": false,
"max... | 27 | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | @@ -78,6 +78,17 @@
def IsChurch (n : Nat) (a : SKI) : Prop :=
∀ f x :SKI, (a ⬝ f ⬝ x) ↠ (Church n f x)
+/-- To show `IsChurch n a` it suffices to show the same for a reduct of `a`. -/
+theorem isChurch_trans (n : Nat) {a a' : SKI} (h : a ↠ a') :
+ IsChurch n a' → IsChurch n a := by
+ simp_rw [IsChurch]
+ i... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_154d6b878631_20 | 6feae2e4c60df4a5 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Languages/CombinatoryLogic/Recursion.lean | Recursion | 20 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 31 | 12 | [
{
"theorem_name": "isChurchPair_trans",
"depth": 1,
"n_commands": 0,
"n_lines": 10,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp_rw [IsChurchPair]\n intro ⟨ha₁,ha₂⟩\n constructor\n · apply isChurch_trans (a' := Fst ⬝ a')\n · apply MRed.t... | [
{
"name": "isChurch_trans",
"text": "/-- To show `IsChurch n a` it suffices to show the same for a reduct of `a`. -/\ntheorem isChurch_trans (n : Nat) {a a' : SKI} (h : a ↠ a') :\n IsChurch n a' → IsChurch n a := by\n simp_rw [IsChurch]\n intro ha' f x\n calc\n _ ↠ a' ⬝ f ⬝ x := by apply MRed.head; a... | [
{
"name": "natUnpairRight_correct",
"fan_in": 0,
"n_deps_direct": 5,
"n_deps_transitive": 30,
"n_lines": 10,
"n_chars": 488,
"n_subproofs": 2,
"n_tactics": 6,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 3,
"automation_only": false,
"ma... | 27 | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | /-
Copyright (c) 2025 Thomas Waring. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Thomas Waring, Jesse Alama
-/
module
public import Cslib.Languages.CombinatoryLogic.Basic
public import Mathlib.Data.Nat.Pairing
/-!
# General recursion in the SKI calculus
In this ... | @@ -78,6 +78,17 @@
def IsChurch (n : Nat) (a : SKI) : Prop :=
∀ f x :SKI, (a ⬝ f ⬝ x) ↠ (Church n f x)
+/-- To show `IsChurch n a` it suffices to show the same for a reduct of `a`. -/
+theorem isChurch_trans (n : Nat) {a a' : SKI} (h : a ↠ a') :
+ IsChurch n a' → IsChurch n a := by
+ simp_rw [IsChurch]
+ i... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_20394acdbe1c_0 | 68e2443a13bf7963 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Computability/Distributed/FLP/Algorithm.lean | Algorithm | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 2 | 1 | [
{
"theorem_name": "decided_stable",
"depth": 1,
"n_commands": 0,
"n_lines": 4,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n obtain ⟨p, _⟩ := hd\n use p\n grind [procDecided_stable]",
"n_chars": 66,
"n_subproofs": 1,
"n_tactics": 4,
... | [
{
"name": "procDecided_stable",
"text": "/-- If `p` is decided on the boolean value `b` in `s` and `s'` is reachable from `s`,\nthen `p` is still decided on `b` in `s'`. -/\ntheorem procDecided_stable {s s' : State P M S} {p : P} {b : Bool}\n (hd : s.ProcDecided p b) (hc : a.lts.CanReach s s') : s'.ProcD... | [
{
"name": "decided_stable",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 9,
"n_chars": 355,
"n_subproofs": 1,
"n_tactics": 4,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 2,
"automation_only": false,
"max_nesting"... | 1 | /-
Copyright (c) 2026 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Foundations.Semantics.LTS.OmegaExecution
/-! # Distributed algorithms for solving the consensus problem
In the consensus problem, eac... | /-
Copyright (c) 2026 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Foundations.Semantics.LTS.OmegaExecution
/-! # Distributed algorithms for solving the consensus problem
In the consensus problem, eac... | @@ -144,10 +144,20 @@
variable {a : Algorithm P M S} {inp : P → Bool}
+/-- If `p` is decided on the boolean value `b` in `s` and `s'` is reachable from `s`,
+then `p` is still decided on `b` in `s'`. -/
+theorem procDecided_stable {s s' : State P M S} {p : P} {b : Bool}
+ (hd : s.ProcDecided p b) (hc : a.lts.Ca... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_20394acdbe1c_1 | 5bac70d86cfa46a8 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Computability/Distributed/FLP/Algorithm.lean | Algorithm | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 2 | 1 | [
{
"theorem_name": "tr_diamond",
"depth": 1,
"n_commands": 0,
"n_lines": 8,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n cases x1 <;> cases x2 <;> try grind [Algorithm.lts]\n case some m1 m2 =>\n have hd : m1.dest ≠ m2.dest := by grind [DestIn]\... | [
{
"name": "recvMsg_comm",
"text": "/-- If `m1` and `m2` are both inflight and they have different destinations,\nthen receiving them in either order produces the same end state. -/\ntheorem recvMsg_comm {m1 m2 : Message P M} {s : State P M S}\n (hd : m1.dest ≠ m2.dest) (h1 : m1 ∈ s.msgs) (h2 : m2 ∈ s.msg... | [
{
"name": "tr_diamond",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 14,
"n_chars": 605,
"n_subproofs": 3,
"n_tactics": 10,
"cyclomatic": 6,
"n_automation": 6,
"n_rewrites": 0,
"n_structural": 4,
"automation_only": false,
"max_nesting": ... | 1 | /-
Copyright (c) 2026 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Foundations.Semantics.LTS.OmegaExecution
/-! # Distributed algorithms for solving the consensus problem
In the consensus problem, eac... | /-
Copyright (c) 2026 Ching-Tsun Chou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ching-Tsun Chou
-/
module
public import Cslib.Foundations.Semantics.LTS.OmegaExecution
/-! # Distributed algorithms for solving the consensus problem
In the consensus problem, eac... | @@ -144,11 +144,38 @@
variable {a : Algorithm P M S} {inp : P → Bool}
+/-- If `m1` and `m2` are both inflight and they have different destinations,
+then receiving them in either order produces the same end state. -/
+theorem recvMsg_comm {m1 m2 : Message P M} {s : State P M S}
+ (hd : m1.dest ≠ m2.dest) (h1 : ... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_eb9bd13f8383_0 | a64373734b0912e8 | lean | lean | github.com/leanprover/cslib | c0120dddfe75d4ab913691c0c184fc436927b19d | Cslib/Foundations/Semantics/LTS/TraceEq.lean | TraceEq | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 9 | 3 | [
{
"theorem_name": "mem_traces_singleton_iff",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp_rw [mem_traces_iff, MTr.singleton_iff lts s μ]",
"n_chars": 58,
"n_subproofs": 0,
"n_tactics": 2,... | [
{
"name": "mem_traces_iff",
"text": "/-- Definition of `LTS.traces` for general label sequences, ... -/\ntheorem mem_traces_iff {lts : LTS State Label} (μs : List Label) :\n μs ∈ lts.traces s ↔ ∃ s', lts.MTr s μs s' := Iff.rfl\n\n",
"fan_in": 3,
"n_lines": 5,
"n_chars": 199,
"n_subproofs": ... | [
{
"name": "mem_traces_singleton_iff",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 6,
"n_chars": 223,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,
"ma... | 1 | /-
Copyright (c) 2025 Fabrizio Montesi. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Fabrizio Montesi
-/
module
public import Cslib.Foundations.Semantics.LTS.Basic
public import Cslib.Foundations.Semantics.LTS.Simulation
/-!
# Trace Equivalence
Definitions and re... | /-
Copyright (c) 2025 Fabrizio Montesi. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Fabrizio Montesi
-/
module
public import Cslib.Foundations.Semantics.LTS.Basic
public import Cslib.Foundations.Semantics.LTS.Simulation
/-!
# Trace Equivalence
Definitions and re... | @@ -41,9 +41,14 @@
transition labelled by `μs` originating from `s`. -/
def traces (lts : LTS State Label) (s : State) := { μs : List Label | ∃ s', lts.MTr s μs s' }
+/-- Definition of `LTS.traces` for general label sequences, ... -/
+theorem mem_traces_iff {lts : LTS State Label} (μs : List Label) :
+ μs ∈ lts.tr... | {
"repo": "cslib",
"git_repo": "github.com/leanprover/cslib",
"revision": "c0120dddfe75d4ab913691c0c184fc436927b19d",
"lean_toolchain": "leanprover/lean4:v4.32.0-rc1",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.