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_0bf2837c3e3e_0 | d6ded84da8150b1c | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Gadgets/Keccak/Permutation.lean | Permutation | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 1 | 1 | [
{
"theorem_name": "soundness",
"depth": 1,
"n_commands": 0,
"n_lines": 34,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n circuit_proof_start [KeccakRound.circuit, KeccakRound.Spec, KeccakRound.Assumptions]\n\n -- simplify\n obtain ⟨ h_init, h_succ... | [
{
"name": "fin_foldl_eq_vector_foldl",
"text": "lemma fin_foldl_eq_vector_foldl (state : Vector ℕ 25) :\n Fin.foldl 24 (fun state j => keccakRound state roundConstants[j]) state\n = roundConstants.foldl keccakRound state := by\n simp only [Vector.foldl, roundConstants, Fin.foldl_eq_foldl_finRange]\n rw ... | [
{
"name": "soundness",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 36,
"n_chars": 1267,
"n_subproofs": 4,
"n_tactics": 26,
"cyclomatic": 2,
"n_automation": 4,
"n_rewrites": 3,
"n_structural": 7,
"automation_only": false,
"max_nesting": ... | 1 | import Batteries.Data.Fin.Fold
import Clean.Gadgets.Keccak.KeccakRound
import Clean.Specs.Keccak256
namespace Gadgets.Keccak256.Permutation
variable {p : ℕ} [Fact p.Prime] [Fact (p > 2^16 + 2^8)]
open Specs.Keccak256
def main (state : Var KeccakState (F p)) : Circuit (F p) (Var KeccakState (F p)) :=
.foldl roundCon... | import Batteries.Data.Fin.Fold
import Clean.Gadgets.Keccak.KeccakRound
import Clean.Specs.Keccak256
namespace Gadgets.Keccak256.Permutation
variable {p : ℕ} [Fact p.Prime] [Fact (p > 2^16 + 2^8)]
open Specs.Keccak256
def main (state : Var KeccakState (F p)) : Circuit (F p) (Var KeccakState (F p)) :=
.foldl roundCon... | @@ -27,8 +27,48 @@
}
-- `Fin.foldl` relates to `Vector.foldl` via this lemma
-theorem soundness : Soundness (F p) main Assumptions Spec := sorry
+lemma fin_foldl_eq_vector_foldl (state : Vector ℕ 25) :
+ Fin.foldl 24 (fun state j => keccakRound state roundConstants[j]) state
+ = roundConstants.foldl keccakRound... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_685ee6e77a45_0 | 76d00a523e439411 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Circuit/Subcircuit.lean | Subcircuit | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 4 | 1 | [
{
"theorem_name": "compose_computableWitnesses",
"depth": 1,
"n_commands": 0,
"n_lines": 4,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro ⟨ h_input, h_computable ⟩\n apply FormalCircuitBase.computableWitnesses_implies h_computable\n exact h_... | [
{
"name": "computableWitnesses_implies",
"text": "/--\n`ComputableWitnesses` is stronger than `ComputableWitnesses'` (so it's fine to only prove the former).\n-/\nlemma computableWitnesses_implies {circuit : FormalCircuitBase F β α} :\n circuit.ComputableWitnesses → circuit.ComputableWitnesses' := by\n ... | [
{
"name": "compose_computableWitnesses",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 14,
"n_chars": 702,
"n_subproofs": 0,
"n_tactics": 4,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 3,
"automation_only": false,
... | 1 | import Clean.Circuit.Formal
import Clean.Circuit.Theorems
variable {F : Type} [FiniteField F]
namespace FlatOperation
lemma constraintsHold_cons : ∀ {op : FlatOperation F}, ∀ {ops : List (FlatOperation F)}, ∀ {env : Environment F},
ConstraintsHoldFlat env (op :: ops) ↔ ConstraintsHoldFlat env [op] ∧ ConstraintsH... | import Clean.Circuit.Formal
import Clean.Circuit.Theorems
variable {F : Type} [FiniteField F]
namespace FlatOperation
lemma constraintsHold_cons : ∀ {op : FlatOperation F}, ∀ {ops : List (FlatOperation F)}, ∀ {env : Environment F},
ConstraintsHoldFlat env (op :: ops) ↔ ConstraintsHoldFlat env [op] ∧ ConstraintsH... | @@ -412,6 +412,30 @@
env.AgreesBelow n env' → eval env input = eval env' input → compute.eval env = compute.eval env' }
/--
+`ComputableWitnesses` is stronger than `ComputableWitnesses'` (so it's fine to only prove the former).
+-/
+lemma computableWitnesses_implies {circuit : FormalCircuitBase F β α} :
+ ... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_685ee6e77a45_1 | ea175bd3782d24f6 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Circuit/Subcircuit.lean | Subcircuit | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 4 | 1 | [
{
"theorem_name": "Circuit.subcircuit_computableWitnesses",
"depth": 1,
"n_commands": 0,
"n_lines": 5,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro h env env'\n simp only [circuit_norm, FormalCircuit.toSubcircuit, Operations.ComputableWitnes... | [
{
"name": "compose_computableWitnesses",
"text": "/--\nComposability for `ComputableWitnesses`: If\n- in the parent circuit, we prove that input variables are < `n`,\n- and the child circuit provides `ElaboratedCircuit.ComputableWitnesses`,\nthen we can conclude that the subcircuit, evaluated at this partic... | [
{
"name": "Circuit.subcircuit_computableWitnesses",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 2,
"n_lines": 12,
"n_chars": 553,
"n_subproofs": 0,
"n_tactics": 5,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 2,
"automation_only":... | 2 | import Clean.Circuit.Formal
import Clean.Circuit.Theorems
variable {F : Type} [FiniteField F]
namespace FlatOperation
lemma constraintsHold_cons : ∀ {op : FlatOperation F}, ∀ {ops : List (FlatOperation F)}, ∀ {env : Environment F},
ConstraintsHoldFlat env (op :: ops) ↔ ConstraintsHoldFlat env [op] ∧ ConstraintsH... | import Clean.Circuit.Formal
import Clean.Circuit.Theorems
variable {F : Type} [FiniteField F]
namespace FlatOperation
lemma constraintsHold_cons : ∀ {op : FlatOperation F}, ∀ {ops : List (FlatOperation F)}, ∀ {env : Environment F},
ConstraintsHoldFlat env (op :: ops) ↔ ConstraintsHoldFlat env [op] ∧ ConstraintsH... | @@ -435,12 +435,29 @@
apply input_only_accesses_n
exact ProverEnvironment.agreesBelow_of_le h_agrees (by linarith)
+/--
+Composability for `ComputableWitnesses`: If
+- in the parent circuit, we prove that input variables are < `n`,
+- and the child circuit provides `ElaboratedCircuit.ComputableWitnesses`,
+... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_685ee6e77a45_2 | 05d0011ea5f478da | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Circuit/Subcircuit.lean | Subcircuit | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 4 | 3 | [
{
"theorem_name": "FormalCircuit.toSubcircuit_channelsLawful",
"depth": 1,
"n_commands": 0,
"n_lines": 13,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [Subcircuit.ChannelsLawful, FormalCircuit.toSubcircuit, Operations.toNested_toFlat]\n ... | [
{
"name": "inChannelsOrRequirements_toFlat",
"text": "lemma inChannelsOrRequirements_toFlat {env : Environment F} {ops : Operations F}\n {channels : List (RawChannel F)} :\n FlatOperation.InChannelsOrRequirements channels env ops.toFlat ↔\n ops.InChannelsOrRequirementsFull channels env := by\n simp_... | [
{
"name": "FormalCircuit.toSubcircuit_channelsLawful",
"fan_in": 1,
"n_deps_direct": 4,
"n_deps_transitive": 4,
"n_lines": 18,
"n_chars": 739,
"n_subproofs": 0,
"n_tactics": 13,
"cyclomatic": 3,
"n_automation": 1,
"n_rewrites": 4,
"n_structural": 7,
"automation_on... | 2 | import Clean.Circuit.Formal
import Clean.Circuit.Theorems
variable {F : Type} [FiniteField F]
namespace FlatOperation
lemma constraintsHold_cons : ∀ {op : FlatOperation F}, ∀ {ops : List (FlatOperation F)}, ∀ {env : Environment F},
ConstraintsHoldFlat env (op :: ops) ↔ ConstraintsHoldFlat env [op] ∧ ConstraintsH... | import Clean.Circuit.Formal
import Clean.Circuit.Theorems
variable {F : Type} [FiniteField F]
namespace FlatOperation
lemma constraintsHold_cons : ∀ {op : FlatOperation F}, ∀ {ops : List (FlatOperation F)}, ∀ {env : Environment F},
ConstraintsHoldFlat env (op :: ops) ↔ ConstraintsHoldFlat env [op] ∧ ConstraintsH... | @@ -46,6 +46,13 @@
simp_all [inChannelsOrGuarantees_iff_forall_mem, Operations.InChannelsOrGuaranteesFull,
circuit_norm]
+lemma inChannelsOrRequirements_toFlat {env : Environment F} {ops : Operations F}
+ {channels : List (RawChannel F)} :
+ FlatOperation.InChannelsOrRequirements channels env ops.toFlat ↔... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_03dda3ca7c7a_0 | 4b7ee130abe903d6 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Gadgets/SHA256/Maj32.lean | Maj32 | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 6 | 2 | [
{
"theorem_name": "testBit_binary_sum",
"depth": 1,
"n_commands": 0,
"n_lines": 19,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n induction n with\n | zero => exact k.elim0\n | succ m ih =>\n rw [Fin.sum_univ_castSucc]; simp only [Fin.val_castS... | [
{
"name": "sum_bool_lt_two_pow",
"text": "private lemma sum_bool_lt_two_pow (n : ℕ) (f : Fin n → ℕ) (hf : ∀ i, f i ≤ 1) :\n ∑ i : Fin n, f i * 2^i.val < 2^n := by\n induction n with\n | zero => simp\n | succ m ih =>\n rw [Fin.sum_univ_castSucc]; simp only [Fin.val_castSucc, Fin.val_last]\n have ... | [
{
"name": "testBit_binary_sum",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 22,
"n_chars": 1118,
"n_subproofs": 4,
"n_tactics": 25,
"cyclomatic": 6,
"n_automation": 7,
"n_rewrites": 6,
"n_structural": 4,
"automation_only": false,
"max_n... | 1 | import Clean.Gadgets.SHA256.BitwiseOps
import Clean.Specs.SHA256
section
variable {p : ℕ} [Fact p.Prime]
namespace Gadgets.SHA256
/-!
# Majority function Maj(a, b, c) for SHA-256
Maj(a, b, c) = (a AND b) XOR (a AND c) XOR (b AND c).
Decomposition: let t = a·b; then maj = t + c·(a + b − 2·t).
Two R1CS constraints pe... | import Clean.Gadgets.SHA256.BitwiseOps
import Clean.Specs.SHA256
section
variable {p : ℕ} [Fact p.Prime]
namespace Gadgets.SHA256
/-!
# Majority function Maj(a, b, c) for SHA-256
Maj(a, b, c) = (a AND b) XOR (a AND c) XOR (b AND c).
Decomposition: let t = a·b; then maj = t + c·(a + b − 2·t).
Two R1CS constraints pe... | @@ -60,6 +60,19 @@
## Helper lemmas for valueBits and bitwise Maj
-/
+private lemma sum_bool_lt_two_pow (n : ℕ) (f : Fin n → ℕ) (hf : ∀ i, f i ≤ 1) :
+ ∑ i : Fin n, f i * 2^i.val < 2^n := by
+ induction n with
+ | zero => simp
+ | succ m ih =>
+ rw [Fin.sum_univ_castSucc]; simp only [Fin.val_castSucc, Fin.... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_03dda3ca7c7a_1 | c7cadbb890105748 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Gadgets/SHA256/Maj32.lean | Maj32 | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 6 | 1 | [
{
"theorem_name": "bool_finsum_maj",
"depth": 1,
"n_commands": 0,
"n_lines": 39,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n apply Nat.eq_of_testBit_eq; intro j\n by_cases hj : j < n\n · have hfg : ∀ i : Fin n, (f i &&& g i) = 0 ∨ (f i &&& g i) ... | [
{
"name": "testBit_binary_sum",
"text": "private lemma testBit_binary_sum (n : ℕ) (f : Fin n → ℕ) (hf : ∀ i, f i = 0 ∨ f i = 1) (k : Fin n) :\n Nat.testBit (∑ i : Fin n, f i * 2^i.val) k.val = decide (f k = 1) := by\n induction n with\n | zero => exact k.elim0\n | succ m ih =>\n rw [Fin.sum_univ_ca... | [
{
"name": "bool_finsum_maj",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 46,
"n_chars": 3123,
"n_subproofs": 17,
"n_tactics": 60,
"cyclomatic": 37,
"n_automation": 10,
"n_rewrites": 2,
"n_structural": 20,
"automation_only": false,
"max_... | 2 | import Clean.Gadgets.SHA256.BitwiseOps
import Clean.Specs.SHA256
section
variable {p : ℕ} [Fact p.Prime]
namespace Gadgets.SHA256
/-!
# Majority function Maj(a, b, c) for SHA-256
Maj(a, b, c) = (a AND b) XOR (a AND c) XOR (b AND c).
Decomposition: let t = a·b; then maj = t + c·(a + b − 2·t).
Two R1CS constraints pe... | import Clean.Gadgets.SHA256.BitwiseOps
import Clean.Specs.SHA256
section
variable {p : ℕ} [Fact p.Prime]
namespace Gadgets.SHA256
/-!
# Majority function Maj(a, b, c) for SHA-256
Maj(a, b, c) = (a AND b) XOR (a AND c) XOR (b AND c).
Decomposition: let t = a·b; then maj = t + c·(a + b − 2·t).
Two R1CS constraints pe... | @@ -73,6 +73,27 @@
have h2 : 2^m + 2^m = 2^(m+1) := by ring
omega
+private lemma testBit_binary_sum (n : ℕ) (f : Fin n → ℕ) (hf : ∀ i, f i = 0 ∨ f i = 1) (k : Fin n) :
+ Nat.testBit (∑ i : Fin n, f i * 2^i.val) k.val = decide (f k = 1) := by
+ induction n with
+ | zero => exact k.elim0
+ | succ m ih =... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_03dda3ca7c7a_2 | 1332e1f34495cbaa | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Gadgets/SHA256/Maj32.lean | Maj32 | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 6 | 1 | [
{
"theorem_name": "spec_of_constraint",
"depth": 1,
"n_commands": 0,
"n_lines": 37,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have ha_b : ∀ i : Fin 32, IsBool input_a[i] := fun i => ha i\n have hb_b : ∀ i : Fin 32, IsBool input_b[i] := fun i =>... | [
{
"name": "maj_is_bool",
"text": "/-- For boolean field elements a, b, c: the field expression t + c*(a+b-2t) where t=a*b\n is boolean -/\nprivate lemma maj_is_bool {α : Type*} [Ring α] {a b c : α} (ha : IsBool a) (hb : IsBool b) (hc : IsBool c) :\n IsBool (a * b + c * (a + b - 2 * (a * b))) := by\n ... | [
{
"name": "spec_of_constraint",
"fan_in": 1,
"n_deps_direct": 3,
"n_deps_transitive": 5,
"n_lines": 46,
"n_chars": 2787,
"n_subproofs": 14,
"n_tactics": 44,
"cyclomatic": 7,
"n_automation": 9,
"n_rewrites": 5,
"n_structural": 11,
"automation_only": false,
"max... | 5 | import Clean.Gadgets.SHA256.BitwiseOps
import Clean.Specs.SHA256
section
variable {p : ℕ} [Fact p.Prime]
namespace Gadgets.SHA256
/-!
# Majority function Maj(a, b, c) for SHA-256
Maj(a, b, c) = (a AND b) XOR (a AND c) XOR (b AND c).
Decomposition: let t = a·b; then maj = t + c·(a + b − 2·t).
Two R1CS constraints pe... | import Clean.Gadgets.SHA256.BitwiseOps
import Clean.Specs.SHA256
section
variable {p : ℕ} [Fact p.Prime]
namespace Gadgets.SHA256
/-!
# Majority function Maj(a, b, c) for SHA-256
Maj(a, b, c) = (a AND b) XOR (a AND c) XOR (b AND c).
Decomposition: let t = a·b; then maj = t + c·(a + b − 2·t).
Two R1CS constraints pe... | @@ -102,6 +102,13 @@
rcases ha with ha | ha <;> rcases hb with hb | hb <;> rcases hc with hc | hc <;>
norm_num [ha, hb, hc, ZMod.val_zero, ZMod.val_one]
+/-- For boolean field elements a, b, c: the field expression t + c*(a+b-2t) where t=a*b
+ is boolean -/
+private lemma maj_is_bool {α : Type*} [Ring α] {... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_03dda3ca7c7a_3 | 899f57c1d01e3589 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Gadgets/SHA256/Maj32.lean | Maj32 | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 6 | 1 | [
{
"theorem_name": "spec_of_constraint",
"depth": 1,
"n_commands": 0,
"n_lines": 37,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have ha_b : ∀ i : Fin 32, IsBool input_a[i] := fun i => ha i\n have hb_b : ∀ i : Fin 32, IsBool input_b[i] := fun i =>... | [
{
"name": "bool_finsum_maj",
"text": "private lemma bool_finsum_maj (n : ℕ) (f g k : Fin n → ℕ)\n (hf : ∀ i, f i = 0 ∨ f i = 1) (hg : ∀ i, g i = 0 ∨ g i = 1) (hk : ∀ i, k i = 0 ∨ k i = 1) :\n ((∑ i : Fin n, f i * 2^i.val) &&& (∑ i : Fin n, g i * 2^i.val)) ^^^\n ((∑ i : Fin n, f i * 2^i.val) &&& (∑ ... | [
{
"name": "soundness",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 6,
"n_lines": 40,
"n_chars": 2044,
"n_subproofs": 15,
"n_tactics": 45,
"cyclomatic": 1,
"n_automation": 6,
"n_rewrites": 3,
"n_structural": 18,
"automation_only": false,
"max_nesting"... | 6 | import Clean.Gadgets.SHA256.BitwiseOps
import Clean.Specs.SHA256
section
variable {p : ℕ} [Fact p.Prime]
namespace Gadgets.SHA256
/-!
# Majority function Maj(a, b, c) for SHA-256
Maj(a, b, c) = (a AND b) XOR (a AND c) XOR (b AND c).
Decomposition: let t = a·b; then maj = t + c·(a + b − 2·t).
Two R1CS constraints pe... | import Clean.Gadgets.SHA256.BitwiseOps
import Clean.Specs.SHA256
section
variable {p : ℕ} [Fact p.Prime]
namespace Gadgets.SHA256
/-!
# Majority function Maj(a, b, c) for SHA-256
Maj(a, b, c) = (a AND b) XOR (a AND c) XOR (b AND c).
Decomposition: let t = a·b; then maj = t + c·(a + b − 2·t).
Two R1CS constraints pe... | @@ -109,6 +109,51 @@
rcases ha with ha | ha <;> rcases hb with hb | hb <;> rcases hc with hc | hc <;>
simp [ha, hb, hc] <;> norm_num <;> first | exact IsBool.zero | exact IsBool.one
+private lemma bool_finsum_maj (n : ℕ) (f g k : Fin n → ℕ)
+ (hf : ∀ i, f i = 0 ∨ f i = 1) (hg : ∀ i, g i = 0 ∨ g i = 1) (hk ... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_856ffe6a9d8e_0 | c36413847a0d329c | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Circuit/WitnessGeneration.lean | WitnessGeneration | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 4 | 2 | [
{
"theorem_name": "witgenStep_toList",
"depth": 1,
"n_commands": 0,
"n_lines": 3,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n cases op <;>\n simp [witgenStep, dynamicWitness, ProverEnvironment.fromArray_eq_fromList, Vector.toList]",
"n_char... | [
{
"name": "ProverEnvironment.fromArray_eq_fromList",
"text": "theorem ProverEnvironment.fromArray_eq_fromList (witnesses : Array F) (hint : ProverHint F) :\n ProverEnvironment.fromArray witnesses hint = .fromList witnesses.toList hint := by\n simp only [ProverEnvironment.fromArray, ProverEnvironment.fro... | [
{
"name": "witgenStep_toList",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 6,
"n_chars": 289,
"n_subproofs": 0,
"n_tactics": 4,
"cyclomatic": 3,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": false,
"max_nesti... | 1 | import Clean.Circuit.Theorems
/-!
# Array-backed witness generation (witgen IR plan, phase 3)
`FlatOperation.dynamicWitnesses` is the semantic reference for witness generation, but
it is accidentally quadratic: the accumulator is a `List` (O(n) append per operation),
and the prover environment it builds is list-backe... | import Clean.Circuit.Theorems
/-!
# Array-backed witness generation (witgen IR plan, phase 3)
`FlatOperation.dynamicWitnesses` is the semantic reference for witness generation, but
it is accidentally quadratic: the accumulator is a `List` (O(n) append per operation),
and the prover environment it builds is list-backe... | @@ -34,6 +34,10 @@
data _ _ := #[]
hint
+theorem ProverEnvironment.fromArray_eq_fromList (witnesses : Array F) (hint : ProverHint F) :
+ ProverEnvironment.fromArray witnesses hint = .fromList witnesses.toList hint := by
+ simp only [ProverEnvironment.fromArray, ProverEnvironment.fromList, Array.getElem?_toL... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_856ffe6a9d8e_1 | 4b0b784e7762ad3c | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Circuit/WitnessGeneration.lean | WitnessGeneration | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 4 | 2 | [
{
"theorem_name": "witgenStep_toList",
"depth": 1,
"n_commands": 0,
"n_lines": 3,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n cases op <;>\n simp [witgenStep, dynamicWitness, ProverEnvironment.fromArray_eq_fromList, Vector.toList]",
"n_char... | [
{
"name": "ProverEnvironment.fromArray_eq_fromList",
"text": "theorem ProverEnvironment.fromArray_eq_fromList (witnesses : Array F) (hint : ProverHint F) :\n ProverEnvironment.fromArray witnesses hint = .fromList witnesses.toList hint := by\n simp only [ProverEnvironment.fromArray, ProverEnvironment.fro... | [
{
"name": "witgen_eq_dynamicWitnesses",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 2,
"n_lines": 10,
"n_chars": 473,
"n_subproofs": 0,
"n_tactics": 5,
"cyclomatic": 2,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 1,
"automation_only": false,
... | 2 | import Clean.Circuit.Theorems
/-!
# Array-backed witness generation (witgen IR plan, phase 3)
`FlatOperation.dynamicWitnesses` is the semantic reference for witness generation, but
it is accidentally quadratic: the accumulator is a `List` (O(n) append per operation),
and the prover environment it builds is list-backe... | import Clean.Circuit.Theorems
/-!
# Array-backed witness generation (witgen IR plan, phase 3)
`FlatOperation.dynamicWitnesses` is the semantic reference for witness generation, but
it is accidentally quadratic: the accumulator is a `List` (O(n) append per operation),
and the prover environment it builds is list-backe... | @@ -34,6 +34,10 @@
data _ _ := #[]
hint
+theorem ProverEnvironment.fromArray_eq_fromList (witnesses : Array F) (hint : ProverHint F) :
+ ProverEnvironment.fromArray witnesses hint = .fromList witnesses.toList hint := by
+ simp only [ProverEnvironment.fromArray, ProverEnvironment.fromList, Array.getElem?_toL... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_856ffe6a9d8e_2 | b4561f4796be2eeb | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Circuit/WitnessGeneration.lean | WitnessGeneration | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 4 | 2 | [
{
"theorem_name": "witgenStep_toList",
"depth": 1,
"n_commands": 0,
"n_lines": 3,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n cases op <;>\n simp [witgenStep, dynamicWitness, ProverEnvironment.fromArray_eq_fromList, Vector.toList]",
"n_char... | [
{
"name": "ProverEnvironment.fromArray_eq_fromList",
"text": "theorem ProverEnvironment.fromArray_eq_fromList (witnesses : Array F) (hint : ProverHint F) :\n ProverEnvironment.fromArray witnesses hint = .fromList witnesses.toList hint := by\n simp only [ProverEnvironment.fromArray, ProverEnvironment.fro... | [
{
"name": "witgen_proverEnvironment",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 3,
"n_lines": 10,
"n_chars": 439,
"n_subproofs": 0,
"n_tactics": 4,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 0,
"automation_only": false,
"m... | 3 | import Clean.Circuit.Theorems
/-!
# Array-backed witness generation (witgen IR plan, phase 3)
`FlatOperation.dynamicWitnesses` is the semantic reference for witness generation, but
it is accidentally quadratic: the accumulator is a `List` (O(n) append per operation),
and the prover environment it builds is list-backe... | import Clean.Circuit.Theorems
/-!
# Array-backed witness generation (witgen IR plan, phase 3)
`FlatOperation.dynamicWitnesses` is the semantic reference for witness generation, but
it is accidentally quadratic: the accumulator is a `List` (O(n) append per operation),
and the prover environment it builds is list-backe... | @@ -34,6 +34,10 @@
data _ _ := #[]
hint
+theorem ProverEnvironment.fromArray_eq_fromList (witnesses : Array F) (hint : ProverHint F) :
+ ProverEnvironment.fromArray witnesses hint = .fromList witnesses.toList hint := by
+ simp only [ProverEnvironment.fromArray, ProverEnvironment.fromList, Array.getElem?_toL... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_856ffe6a9d8e_3 | dbac2d33f8a1afa9 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Circuit/WitnessGeneration.lean | WitnessGeneration | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 4 | 2 | [
{
"theorem_name": "witgenStep_toList",
"depth": 1,
"n_commands": 0,
"n_lines": 3,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n cases op <;>\n simp [witgenStep, dynamicWitness, ProverEnvironment.fromArray_eq_fromList, Vector.toList]",
"n_char... | [
{
"name": "ProverEnvironment.fromArray_eq_fromList",
"text": "theorem ProverEnvironment.fromArray_eq_fromList (witnesses : Array F) (hint : ProverHint F) :\n ProverEnvironment.fromArray witnesses hint = .fromList witnesses.toList hint := by\n simp only [ProverEnvironment.fromArray, ProverEnvironment.fro... | [
{
"name": "witgen_usesLocalWitnesses",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 4,
"n_lines": 14,
"n_chars": 644,
"n_subproofs": 1,
"n_tactics": 5,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 1,
"automation_only": false,
"... | 4 | import Clean.Circuit.Theorems
/-!
# Array-backed witness generation (witgen IR plan, phase 3)
`FlatOperation.dynamicWitnesses` is the semantic reference for witness generation, but
it is accidentally quadratic: the accumulator is a `List` (O(n) append per operation),
and the prover environment it builds is list-backe... | import Clean.Circuit.Theorems
/-!
# Array-backed witness generation (witgen IR plan, phase 3)
`FlatOperation.dynamicWitnesses` is the semantic reference for witness generation, but
it is accidentally quadratic: the accumulator is a `List` (O(n) append per operation),
and the prover environment it builds is list-backe... | @@ -34,6 +34,10 @@
data _ _ := #[]
hint
+theorem ProverEnvironment.fromArray_eq_fromList (witnesses : Array F) (hint : ProverHint F) :
+ ProverEnvironment.fromArray witnesses hint = .fromList witnesses.toList hint := by
+ simp only [ProverEnvironment.fromArray, ProverEnvironment.fromList, Array.getElem?_toL... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_472f47c1374e_0 | 6a3410f969e2beac | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Circuit/Operations.lean | Operations | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 4 | 1 | [
{
"theorem_name": "guarantees_of_fullGuarantees",
"depth": 1,
"n_commands": 0,
"n_lines": 5,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rw [guarantees_iff_forall_mem, FullGuarantees]\n intro grts i hi\n apply grts\n exact mem_interactions_of_m... | [
{
"name": "mem_interactions_of_mem_shallowInteractions",
"text": "lemma mem_interactions_of_mem_shallowInteractions {i : AbstractInteraction F} {ops : Operations F} :\n i ∈ ops.shallowInteractions → i ∈ ops.interactions := by\n induction ops using induct <;> (\n simp_all [shallowInteractions, interac... | [
{
"name": "guarantees_of_fullGuarantees",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 3,
"n_lines": 9,
"n_chars": 310,
"n_subproofs": 0,
"n_tactics": 5,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 1,
"n_structural": 3,
"automation_only": false,
... | 1 | import Clean.Circuit.Expression
import Clean.Circuit.Lookup
import Clean.Circuit.WitnessIRSugar
import Clean.Circuit.Provable
import Clean.Circuit.Channel
import Clean.Circuit.SimpGadget
variable {F : Type} [FiniteField F] {α : Type} {n : ℕ}
/--
`FlatOperation` models the operations that can be done in a circuit, in ... | import Clean.Circuit.Expression
import Clean.Circuit.Lookup
import Clean.Circuit.WitnessIRSugar
import Clean.Circuit.Provable
import Clean.Circuit.Channel
import Clean.Circuit.SimpGadget
variable {F : Type} [FiniteField F] {α : Type} {n : ℕ}
/--
`FlatOperation` models the operations that can be done in a circuit, in ... | @@ -731,8 +731,18 @@
def FullGuarantees (env : Environment F) (ops : Operations F) : Prop :=
∀ i ∈ ops.interactions, i.Guarantees env
+lemma mem_interactions_of_mem_shallowInteractions {i : AbstractInteraction F} {ops : Operations F} :
+ i ∈ ops.shallowInteractions → i ∈ ops.interactions := by
+ induction ops... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_472f47c1374e_1 | 8f1ef5762b6ea6cd | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Circuit/Operations.lean | Operations | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 4 | 2 | [
{
"theorem_name": "subcircuitChannelsWithGuarantees_append",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp [subcircuitChannelsWithGuarantees_eq_subcircuits_map, subcircuits_append]",
"n_chars": 84,... | [
{
"name": "subcircuitChannelsWithGuarantees_eq_subcircuits_map",
"text": "lemma subcircuitChannelsWithGuarantees_eq_subcircuits_map {ops : Operations F} :\n subcircuitChannelsWithGuarantees ops = (ops.subcircuits.map (·.2.channelsWithGuarantees)).flatten := by\n induction ops using induct <;>\n simp_al... | [
{
"name": "subcircuitChannelsWithGuarantees_append",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 7,
"n_chars": 320,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only":... | 1 | import Clean.Circuit.Expression
import Clean.Circuit.Lookup
import Clean.Circuit.WitnessIRSugar
import Clean.Circuit.Provable
import Clean.Circuit.Channel
import Clean.Circuit.SimpGadget
variable {F : Type} [FiniteField F] {α : Type} {n : ℕ}
/--
`FlatOperation` models the operations that can be done in a circuit, in ... | import Clean.Circuit.Expression
import Clean.Circuit.Lookup
import Clean.Circuit.WitnessIRSugar
import Clean.Circuit.Provable
import Clean.Circuit.Channel
import Clean.Circuit.SimpGadget
variable {F : Type} [FiniteField F] {α : Type} {n : ℕ}
/--
`FlatOperation` models the operations that can be done in a circuit, in ... | @@ -888,10 +888,16 @@
subcircuitChannelsWithGuarantees (.subcircuit s :: ops) =
s.channelsWithGuarantees ++ subcircuitChannelsWithGuarantees ops := rfl
+lemma subcircuitChannelsWithGuarantees_eq_subcircuits_map {ops : Operations F} :
+ subcircuitChannelsWithGuarantees ops = (ops.subcircuits.map (·.2.chan... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_472f47c1374e_2 | c1d648464bfe1fdf | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Circuit/Operations.lean | Operations | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 4 | 2 | [
{
"theorem_name": "subcircuitChannelsWithGuarantees_append",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp [subcircuitChannelsWithGuarantees_eq_subcircuits_map, subcircuits_append]",
"n_chars": 84,... | [
{
"name": "subcircuitChannelsWithGuarantees_eq_subcircuits_map",
"text": "lemma subcircuitChannelsWithGuarantees_eq_subcircuits_map {ops : Operations F} :\n subcircuitChannelsWithGuarantees ops = (ops.subcircuits.map (·.2.channelsWithGuarantees)).flatten := by\n induction ops using induct <;>\n simp_al... | [
{
"name": "subcircuitChannelsWithGuarantees_subset_iff_forall",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 8,
"n_chars": 351,
"n_subproofs": 0,
"n_tactics": 4,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 1,
"n_structural": 0,
"automa... | 1 | import Clean.Circuit.Expression
import Clean.Circuit.Lookup
import Clean.Circuit.WitnessIRSugar
import Clean.Circuit.Provable
import Clean.Circuit.Channel
import Clean.Circuit.SimpGadget
variable {F : Type} [FiniteField F] {α : Type} {n : ℕ}
/--
`FlatOperation` models the operations that can be done in a circuit, in ... | import Clean.Circuit.Expression
import Clean.Circuit.Lookup
import Clean.Circuit.WitnessIRSugar
import Clean.Circuit.Provable
import Clean.Circuit.Channel
import Clean.Circuit.SimpGadget
variable {F : Type} [FiniteField F] {α : Type} {n : ℕ}
/--
`FlatOperation` models the operations that can be done in a circuit, in ... | @@ -888,14 +888,23 @@
subcircuitChannelsWithGuarantees (.subcircuit s :: ops) =
s.channelsWithGuarantees ++ subcircuitChannelsWithGuarantees ops := rfl
+lemma subcircuitChannelsWithGuarantees_eq_subcircuits_map {ops : Operations F} :
+ subcircuitChannelsWithGuarantees ops = (ops.subcircuits.map (·.2.chan... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_472f47c1374e_3 | 2e2e1aa20accb9a7 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Circuit/Operations.lean | Operations | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 4 | 2 | [
{
"theorem_name": "subcircuitChannelsWithRequirements_append",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp [subcircuitChannelsWithRequirements_eq_subcircuits_map, subcircuits_append]",
"n_chars":... | [
{
"name": "subcircuitChannelsWithRequirements_eq_subcircuits_map",
"text": "lemma subcircuitChannelsWithRequirements_eq_subcircuits_map {ops : Operations F} :\n subcircuitChannelsWithRequirements ops = (ops.subcircuits\n |>.map (fun s => s.2.channelsWithRequirements) |>.flatten) := by\n induction ops... | [
{
"name": "subcircuitChannelsWithRequirements_append",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 7,
"n_chars": 330,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only... | 1 | import Clean.Circuit.Expression
import Clean.Circuit.Lookup
import Clean.Circuit.WitnessIRSugar
import Clean.Circuit.Provable
import Clean.Circuit.Channel
import Clean.Circuit.SimpGadget
variable {F : Type} [FiniteField F] {α : Type} {n : ℕ}
/--
`FlatOperation` models the operations that can be done in a circuit, in ... | import Clean.Circuit.Expression
import Clean.Circuit.Lookup
import Clean.Circuit.WitnessIRSugar
import Clean.Circuit.Provable
import Clean.Circuit.Channel
import Clean.Circuit.SimpGadget
variable {F : Type} [FiniteField F] {α : Type} {n : ℕ}
/--
`FlatOperation` models the operations that can be done in a circuit, in ... | @@ -918,10 +918,17 @@
subcircuitChannelsWithRequirements (.subcircuit s :: ops) =
s.channelsWithRequirements ++ subcircuitChannelsWithRequirements ops := rfl
+lemma subcircuitChannelsWithRequirements_eq_subcircuits_map {ops : Operations F} :
+ subcircuitChannelsWithRequirements ops = (ops.subcircuits
+ ... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_472f47c1374e_4 | 870ac6cf1a5f1913 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Circuit/Operations.lean | Operations | 4 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 4 | 2 | [
{
"theorem_name": "subcircuitChannelsWithRequirements_append",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp [subcircuitChannelsWithRequirements_eq_subcircuits_map, subcircuits_append]",
"n_chars":... | [
{
"name": "subcircuitChannelsWithRequirements_eq_subcircuits_map",
"text": "lemma subcircuitChannelsWithRequirements_eq_subcircuits_map {ops : Operations F} :\n subcircuitChannelsWithRequirements ops = (ops.subcircuits\n |>.map (fun s => s.2.channelsWithRequirements) |>.flatten) := by\n induction ops... | [
{
"name": "subcircuitChannelsWithRequirements_subset_iff_forall",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 8,
"n_chars": 359,
"n_subproofs": 0,
"n_tactics": 4,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 1,
"n_structural": 0,
"auto... | 1 | import Clean.Circuit.Expression
import Clean.Circuit.Lookup
import Clean.Circuit.WitnessIRSugar
import Clean.Circuit.Provable
import Clean.Circuit.Channel
import Clean.Circuit.SimpGadget
variable {F : Type} [FiniteField F] {α : Type} {n : ℕ}
/--
`FlatOperation` models the operations that can be done in a circuit, in ... | import Clean.Circuit.Expression
import Clean.Circuit.Lookup
import Clean.Circuit.WitnessIRSugar
import Clean.Circuit.Provable
import Clean.Circuit.Channel
import Clean.Circuit.SimpGadget
variable {F : Type} [FiniteField F] {α : Type} {n : ℕ}
/--
`FlatOperation` models the operations that can be done in a circuit, in ... | @@ -918,14 +918,24 @@
subcircuitChannelsWithRequirements (.subcircuit s :: ops) =
s.channelsWithRequirements ++ subcircuitChannelsWithRequirements ops := rfl
+lemma subcircuitChannelsWithRequirements_eq_subcircuits_map {ops : Operations F} :
+ subcircuitChannelsWithRequirements ops = (ops.subcircuits
+ ... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_472f47c1374e_5 | 8bec23d0ecf40bc7 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Circuit/Operations.lean | Operations | 5 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 4 | 1 | [
{
"theorem_name": "shallowChannels_append",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp [shallowChannels_eq_interactions_map, shallowInteractions_append]",
"n_chars": 76,
"n_subproofs": 0,
... | [
{
"name": "shallowChannels_eq_interactions_map",
"text": "lemma shallowChannels_eq_interactions_map {ops : Operations F} :\n shallowChannels ops = ops.shallowInteractions.map (·.channel) := by\n induction ops using induct <;> simp_all [shallowInteractions, shallowChannels]\n\n",
"fan_in": 1,
"n_... | [
{
"name": "shallowChannels_append",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 5,
"n_chars": 238,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,
"max_n... | 1 | import Clean.Circuit.Expression
import Clean.Circuit.Lookup
import Clean.Circuit.WitnessIRSugar
import Clean.Circuit.Provable
import Clean.Circuit.Channel
import Clean.Circuit.SimpGadget
variable {F : Type} [FiniteField F] {α : Type} {n : ℕ}
/--
`FlatOperation` models the operations that can be done in a circuit, in ... | import Clean.Circuit.Expression
import Clean.Circuit.Lookup
import Clean.Circuit.WitnessIRSugar
import Clean.Circuit.Provable
import Clean.Circuit.Channel
import Clean.Circuit.SimpGadget
variable {F : Type} [FiniteField F] {α : Type} {n : ℕ}
/--
`FlatOperation` models the operations that can be done in a circuit, in ... | @@ -942,8 +942,13 @@
@[circuit_norm] theorem shallowChannels_subcircuit {n : ℕ} (s : Subcircuit F n) (ops : Operations F) :
shallowChannels (.subcircuit s :: ops) = shallowChannels ops := rfl
+lemma shallowChannels_eq_interactions_map {ops : Operations F} :
+ shallowChannels ops = ops.shallowInteractions.map (... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_472f47c1374e_6 | dc01ab2b2ff5fb30 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Circuit/Operations.lean | Operations | 6 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 4 | 2 | [
{
"theorem_name": "subcircuitChannelsWithGuarantees_append",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp [subcircuitChannelsWithGuarantees_eq_subcircuits_map, subcircuits_append]",
"n_chars": 84,... | [
{
"name": "subcircuitChannelsWithGuarantees_eq_subcircuits_map",
"text": "lemma subcircuitChannelsWithGuarantees_eq_subcircuits_map {ops : Operations F} :\n subcircuitChannelsWithGuarantees ops = (ops.subcircuits.map (·.2.channelsWithGuarantees)).flatten := by\n induction ops using induct <;>\n simp_al... | [
{
"name": "channelsLawful_append_of_channelsLawful",
"fan_in": 0,
"n_deps_direct": 3,
"n_deps_transitive": 5,
"n_lines": 25,
"n_chars": 1023,
"n_subproofs": 2,
"n_tactics": 18,
"cyclomatic": 2,
"n_automation": 0,
"n_rewrites": 4,
"n_structural": 10,
"automation_on... | 1 | import Clean.Circuit.Expression
import Clean.Circuit.Lookup
import Clean.Circuit.WitnessIRSugar
import Clean.Circuit.Provable
import Clean.Circuit.Channel
import Clean.Circuit.SimpGadget
variable {F : Type} [FiniteField F] {α : Type} {n : ℕ}
/--
`FlatOperation` models the operations that can be done in a circuit, in ... | import Clean.Circuit.Expression
import Clean.Circuit.Lookup
import Clean.Circuit.WitnessIRSugar
import Clean.Circuit.Provable
import Clean.Circuit.Channel
import Clean.Circuit.SimpGadget
variable {F : Type} [FiniteField F] {α : Type} {n : ℕ}
/--
`FlatOperation` models the operations that can be done in a circuit, in ... | @@ -912,10 +912,16 @@
subcircuitChannelsWithGuarantees (.subcircuit s :: ops) =
s.channelsWithGuarantees ++ subcircuitChannelsWithGuarantees ops := rfl
+lemma subcircuitChannelsWithGuarantees_eq_subcircuits_map {ops : Operations F} :
+ subcircuitChannelsWithGuarantees ops = (ops.subcircuits.map (·.2.chan... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_8a2f653f613f_0 | d2f71b5027b1b0fc | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/Vm.lean | Vm | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 32 | 1 | [
{
"theorem_name": "EnsembleWitness.flatMap_interactionsWith_eq_flatten",
"depth": 1,
"n_commands": 0,
"n_lines": 3,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [EnsembleWitness.interactionsWith, Table.interactionsWith, Table.interactions... | [
{
"name": "List.flatMap_flatMap",
"text": "/-- Instead of first map-flattening on the inside, then on the outside,\nwe can map to a 3D array, then flatten the outside, and only then the inside.\nGood if you want to preserve the inner structure. -/\nlemma List.flatMap_flatMap {α β γ : Type*} (l : List γ) (g ... | [
{
"name": "EnsembleWitness.flatMap_interactionsWith_eq_flatten",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 9,
"n_chars": 491,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 0,
"autom... | 1 | import Clean.Air.FlatEnsemble
import Clean.Air.OrderedChannel
variable {F : Type} [FiniteField F] [DecidableEq F]
variable {PublicIO : TypeMap} [ProvableType PublicIO]
/-
## VM ensembles
VM-like ensembles have a "main channel" that stores the VM state, which we'll call a _VM channel_.
One or more tables pull from, t... | import Clean.Air.FlatEnsemble
import Clean.Air.OrderedChannel
variable {F : Type} [FiniteField F] [DecidableEq F]
variable {PublicIO : TypeMap} [ProvableType PublicIO]
/-
## VM ensembles
VM-like ensembles have a "main channel" that stores the VM state, which we'll call a _VM channel_.
One or more tables pull from, t... | @@ -170,6 +170,17 @@
simp only [zip_cons_cons, flattenPairs_cons, cons_append, nil_append]
grw [perm_cons, ← perm_cons_append_cons _ perm_rfl, perm_cons, ih]
+/-- Instead of first map-flattening on the inside, then on the outside,
+we can map to a 3D array, then flatten the outside, and only then the inside... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_8a2f653f613f_1 | c688f3eef6b0d3ef | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/Vm.lean | Vm | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 32 | 1 | [
{
"theorem_name": "allTables_channel",
"depth": 1,
"n_commands": 0,
"n_lines": 9,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro table table_mem\n simp only [circuit_norm, Ensemble.allTables] at table_mem ⊢\n by_cases h : table = vm.toEnsembl... | [
{
"name": "tables_channel'",
"text": "/-- Concrete version of VmTables.tables_channel -/\ntheorem tables_channel' (vm : VmTables F PublicIO) {table} (table_mem : table ∈ vm.tables) :\n let step := vm.tableStep table_mem\n ⟨ vm.channel,\n [(vm.channel.pulledIf step.enabled step.pull).toRaw,\n (vm.c... | [
{
"name": "allTables_channel",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 3,
"n_lines": 15,
"n_chars": 648,
"n_subproofs": 0,
"n_tactics": 9,
"cyclomatic": 1,
"n_automation": 3,
"n_rewrites": 1,
"n_structural": 3,
"automation_only": false,
"max_nest... | 2 | import Clean.Air.FlatEnsemble
import Clean.Air.OrderedChannel
variable {F : Type} [FiniteField F] [DecidableEq F]
variable {PublicIO : TypeMap} [ProvableType PublicIO]
/-
## VM ensembles
VM-like ensembles have a "main channel" that stores the VM state, which we'll call a _VM channel_.
One or more tables pull from, t... | import Clean.Air.FlatEnsemble
import Clean.Air.OrderedChannel
variable {F : Type} [FiniteField F] [DecidableEq F]
variable {PublicIO : TypeMap} [ProvableType PublicIO]
/-
## VM ensembles
VM-like ensembles have a "main channel" that stores the VM state, which we'll call a _VM channel_.
One or more tables pull from, t... | @@ -233,6 +233,14 @@
pull := (vm.tables_channel_of_mem table_mem).choose_spec.choose
push := (vm.tables_channel_of_mem table_mem).choose_spec.choose_spec.choose
+/-- Concrete version of VmTables.tables_channel -/
+theorem tables_channel' (vm : VmTables F PublicIO) {table} (table_mem : table ∈ vm.tables) :
+ le... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_8a2f653f613f_2 | 6e8dc7fdb29b8681 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/Vm.lean | Vm | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 32 | 1 | [
{
"theorem_name": "allTables_channel",
"depth": 1,
"n_commands": 0,
"n_lines": 9,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro table table_mem\n simp only [circuit_norm, Ensemble.allTables] at table_mem ⊢\n by_cases h : table = vm.toEnsembl... | [
{
"name": "verifier_channel'",
"text": "/-- Concrete version of VmTables.verifier_channel -/\ntheorem verifier_channel' (vm : VmTables F PublicIO) :\n ⟨ vm.channel,\n [(vm.channel.pulled vm.verifierPull).toRaw,\n (vm.channel.pushed vm.verifierPush).toRaw] ⟩ ∈\n vm.verifier.exposedChannels (varFr... | [
{
"name": "interactionsWith_eq",
"fan_in": 2,
"n_deps_direct": 1,
"n_deps_transitive": 4,
"n_lines": 8,
"n_chars": 404,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 2,
"automation_only": false,
"max_nes... | 3 | import Clean.Air.FlatEnsemble
import Clean.Air.OrderedChannel
variable {F : Type} [FiniteField F] [DecidableEq F]
variable {PublicIO : TypeMap} [ProvableType PublicIO]
/-
## VM ensembles
VM-like ensembles have a "main channel" that stores the VM state, which we'll call a _VM channel_.
One or more tables pull from, t... | import Clean.Air.FlatEnsemble
import Clean.Air.OrderedChannel
variable {F : Type} [FiniteField F] [DecidableEq F]
variable {PublicIO : TypeMap} [ProvableType PublicIO]
/-
## VM ensembles
VM-like ensembles have a "main channel" that stores the VM state, which we'll call a _VM channel_.
One or more tables pull from, t... | @@ -252,6 +252,14 @@
noncomputable def verifierPush (vm : VmTables F PublicIO) : Var vm.Message F :=
vm.verifier_channel.choose_spec.choose
+/-- Concrete version of VmTables.verifier_channel -/
+theorem verifier_channel' (vm : VmTables F PublicIO) :
+ ⟨ vm.channel,
+ [(vm.channel.pulled vm.verifierPull).toRaw... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_8a2f653f613f_3 | 2061a3beefa1b328 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/Vm.lean | Vm | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 32 | 1 | [
{
"theorem_name": "interactionsWith_eq",
"depth": 1,
"n_commands": 0,
"n_lines": 3,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n apply Component.interactionsWith_of_exposedChannels\n apply vm.allTables_channel",
"n_chars": 86,
"n_subproofs... | [
{
"name": "allTables_channel",
"text": "theorem allTables_channel (vm : VmTables F PublicIO) : ∀ (table) (table_mem : table ∈ vm.allTables),\n let step := vm.step table_mem\n ⟨ vm.channel,\n [(vm.channel.pulledIf step.enabled step.pull).toRaw,\n (vm.channel.pushedIf step.enabled step.push).toRaw] ... | [
{
"name": "verifierInteractionsWith_eq",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 5,
"n_lines": 6,
"n_chars": 388,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,
"... | 4 | import Clean.Air.FlatEnsemble
import Clean.Air.OrderedChannel
variable {F : Type} [FiniteField F] [DecidableEq F]
variable {PublicIO : TypeMap} [ProvableType PublicIO]
/-
## VM ensembles
VM-like ensembles have a "main channel" that stores the VM state, which we'll call a _VM channel_.
One or more tables pull from, t... | import Clean.Air.FlatEnsemble
import Clean.Air.OrderedChannel
variable {F : Type} [FiniteField F] [DecidableEq F]
variable {PublicIO : TypeMap} [ProvableType PublicIO]
/-
## VM ensembles
VM-like ensembles have a "main channel" that stores the VM state, which we'll call a _VM channel_.
One or more tables pull from, t... | @@ -272,10 +272,26 @@
then vm.verifierStep
else vm.tableStep (List.mem_of_ne_of_mem h h_mem)
+theorem allTables_channel (vm : VmTables F PublicIO) : ∀ (table) (table_mem : table ∈ vm.allTables),
+ let step := vm.step table_mem
+ ⟨ vm.channel,
+ [(vm.channel.pulledIf step.enabled step.pull).toRaw,
+ (v... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_8a2f653f613f_4 | 9ad266bec55c267e | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/Vm.lean | Vm | 4 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 32 | 1 | [
{
"theorem_name": "interactionsWith_eq",
"depth": 1,
"n_commands": 0,
"n_lines": 3,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n apply Component.interactionsWith_of_exposedChannels\n apply vm.allTables_channel",
"n_chars": 86,
"n_subproofs... | [
{
"name": "allTables_channel",
"text": "theorem allTables_channel (vm : VmTables F PublicIO) : ∀ (table) (table_mem : table ∈ vm.allTables),\n let step := vm.step table_mem\n ⟨ vm.channel,\n [(vm.channel.pulledIf step.enabled step.pull).toRaw,\n (vm.channel.pushedIf step.enabled step.push).toRaw] ... | [
{
"name": "interactionValuesWith_length",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 6,
"n_lines": 6,
"n_chars": 290,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,
... | 5 | import Clean.Air.FlatEnsemble
import Clean.Air.OrderedChannel
variable {F : Type} [FiniteField F] [DecidableEq F]
variable {PublicIO : TypeMap} [ProvableType PublicIO]
/-
## VM ensembles
VM-like ensembles have a "main channel" that stores the VM state, which we'll call a _VM channel_.
One or more tables pull from, t... | import Clean.Air.FlatEnsemble
import Clean.Air.OrderedChannel
variable {F : Type} [FiniteField F] [DecidableEq F]
variable {PublicIO : TypeMap} [ProvableType PublicIO]
/-
## VM ensembles
VM-like ensembles have a "main channel" that stores the VM state, which we'll call a _VM channel_.
One or more tables pull from, t... | @@ -272,10 +272,26 @@
then vm.verifierStep
else vm.tableStep (List.mem_of_ne_of_mem h h_mem)
+theorem allTables_channel (vm : VmTables F PublicIO) : ∀ (table) (table_mem : table ∈ vm.allTables),
+ let step := vm.step table_mem
+ ⟨ vm.channel,
+ [(vm.channel.pulledIf step.enabled step.pull).toRaw,
+ (v... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_8a2f653f613f_5 | 19ab5961f4c1ed39 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/Vm.lean | Vm | 5 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 32 | 2 | [
{
"theorem_name": "zip_pulls_pushes_eq_interactionPairs",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [pulls, pushes, List.zip_map_fst_snd]",
"n_chars": 53,
"n_subproofs": 0,
"n_tact... | [
{
"name": "List.zip_map_fst_snd",
"text": "lemma List.zip_map_fst_snd {α β : Type} (pairs : List (α × β)) :\n List.zip (pairs.map Prod.fst) (pairs.map Prod.snd) = pairs := by\n induction pairs with\n | nil => rfl\n | cons pair pairs ih =>\n simp [ih]\n\n",
"fan_in": 2,
"n_lines": 8,
"n_... | [
{
"name": "zip_pulls_pushes_eq_interactionPairs",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 5,
"n_chars": 196,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": tr... | 1 | import Clean.Air.FlatEnsemble
import Clean.Air.OrderedChannel
variable {F : Type} [FiniteField F] [DecidableEq F]
variable {PublicIO : TypeMap} [ProvableType PublicIO]
/-
## VM ensembles
VM-like ensembles have a "main channel" that stores the VM state, which we'll call a _VM channel_.
One or more tables pull from, t... | import Clean.Air.FlatEnsemble
import Clean.Air.OrderedChannel
variable {F : Type} [FiniteField F] [DecidableEq F]
variable {PublicIO : TypeMap} [ProvableType PublicIO]
/-
## VM ensembles
VM-like ensembles have a "main channel" that stores the VM state, which we'll call a _VM channel_.
One or more tables pull from, t... | @@ -181,6 +181,13 @@
simp [ih]
rfl
+lemma List.zip_map_fst_snd {α β : Type} (pairs : List (α × β)) :
+ List.zip (pairs.map Prod.fst) (pairs.map Prod.snd) = pairs := by
+ induction pairs with
+ | nil => rfl
+ | cons pair pairs ih =>
+ simp [ih]
+
namespace Air.Flat
omit [DecidableEq F] in
/-- Ens... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_8a2f653f613f_6 | 557044b327073429 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/Vm.lean | Vm | 6 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 32 | 1 | [
{
"theorem_name": "rowEnabled_isBool_of_constraints",
"depth": 1,
"n_commands": 0,
"n_lines": 12,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro constraints table table_mem row row_mem\n simp only [circuit_norm, rowEnabled, VmTables.step, VmTa... | [
{
"name": "tableStep_enabled_isBool",
"text": "theorem tableStep_enabled_isBool (vm : VmTables F PublicIO) {table} (table_mem : table ∈ vm.tables) :\n ∀ env, table.operations.ConstraintsHold env →\n IsBool (Expression.eval env (vm.tableStep table_mem).enabled) :=\n (vm.tables_channel_of_mem table_m... | [
{
"name": "rowEnabled_isBool_of_constraints",
"fan_in": 4,
"n_deps_direct": 1,
"n_deps_transitive": 2,
"n_lines": 17,
"n_chars": 869,
"n_subproofs": 3,
"n_tactics": 12,
"cyclomatic": 1,
"n_automation": 4,
"n_rewrites": 0,
"n_structural": 3,
"automation_only": fals... | 1 | import Clean.Air.FlatEnsemble
import Clean.Air.OrderedChannel
variable {F : Type} [FiniteField F] [DecidableEq F]
variable {PublicIO : TypeMap} [ProvableType PublicIO]
/-
## VM ensembles
VM-like ensembles have a "main channel" that stores the VM state, which we'll call a _VM channel_.
One or more tables pull from, t... | import Clean.Air.FlatEnsemble
import Clean.Air.OrderedChannel
variable {F : Type} [FiniteField F] [DecidableEq F]
variable {PublicIO : TypeMap} [ProvableType PublicIO]
/-
## VM ensembles
VM-like ensembles have a "main channel" that stores the VM state, which we'll call a _VM channel_.
One or more tables pull from, t... | @@ -241,6 +241,11 @@
(vm.channel.pushedIf step.enabled step.push).toRaw] ⟩ ∈ table.exposedChannels :=
(vm.tables_channel_of_mem table_mem).choose_spec.choose_spec.choose_spec.left
+theorem tableStep_enabled_isBool (vm : VmTables F PublicIO) {table} (table_mem : table ∈ vm.tables) :
+ ∀ env, table.operati... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_8a2f653f613f_7 | 528d1da6ff6d1bcf | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/Vm.lean | Vm | 7 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 32 | 3 | [
{
"theorem_name": "pulls_mult",
"depth": 1,
"n_commands": 0,
"n_lines": 5,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp_rw [witness.mem_pulls_iff]\n rintro constraints pull ⟨ table, table_mem, row, row_mem, rfl ⟩\n simp only [circuit_norm, n... | [
{
"name": "mem_pulls_iff",
"text": "lemma mem_pulls_iff {witness : VmWitness vm} {pull : Interaction F} :\n pull ∈ witness.pulls ↔\n ∃ (table : Table F) (_ : table ∈ witness.allTables), ∃ row ∈ table.table,\n pull = vm.channel.pulledIfValue (witness.rowEnabled ‹_› row) (witness.rowPull ‹_› row) := by... | [
{
"name": "pulls_mult",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 4,
"n_lines": 9,
"n_chars": 363,
"n_subproofs": 0,
"n_tactics": 5,
"cyclomatic": 2,
"n_automation": 2,
"n_rewrites": 0,
"n_structural": 2,
"automation_only": false,
"max_nesting": 2
... | 3 | import Clean.Air.FlatEnsemble
import Clean.Air.OrderedChannel
variable {F : Type} [FiniteField F] [DecidableEq F]
variable {PublicIO : TypeMap} [ProvableType PublicIO]
/-
## VM ensembles
VM-like ensembles have a "main channel" that stores the VM state, which we'll call a _VM channel_.
One or more tables pull from, t... | import Clean.Air.FlatEnsemble
import Clean.Air.OrderedChannel
variable {F : Type} [FiniteField F] [DecidableEq F]
variable {PublicIO : TypeMap} [ProvableType PublicIO]
/-
## VM ensembles
VM-like ensembles have a "main channel" that stores the VM state, which we'll call a _VM channel_.
One or more tables pull from, t... | @@ -356,6 +356,13 @@
noncomputable def pushes (witness : VmWitness vm) : List (Interaction F) :=
witness.interactionPairs.map Prod.snd
+lemma mem_pulls_iff {witness : VmWitness vm} {pull : Interaction F} :
+ pull ∈ witness.pulls ↔
+ ∃ (table : Table F) (_ : table ∈ witness.allTables), ∃ row ∈ table.table,
+ ... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_8a2f653f613f_8 | 22524f1a4ee3fdc5 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/Vm.lean | Vm | 8 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 32 | 3 | [
{
"theorem_name": "pushes_mult",
"depth": 1,
"n_commands": 0,
"n_lines": 5,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp_rw [witness.mem_pushes_iff]\n rintro constraints push ⟨ table, table_mem, row, row_mem, rfl ⟩\n simp only [circuit_norm]... | [
{
"name": "mem_pushes_iff",
"text": "lemma mem_pushes_iff {witness : VmWitness vm} {push : Interaction F} :\n push ∈ witness.pushes ↔\n ∃ (table : Table F) (_ : table ∈ witness.allTables), ∃ row ∈ table.table,\n push = vm.channel.pushedIfValue (witness.rowEnabled ‹_› row) (witness.rowPush ‹_› row) :=... | [
{
"name": "pushes_mult",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 4,
"n_lines": 9,
"n_chars": 356,
"n_subproofs": 0,
"n_tactics": 5,
"cyclomatic": 2,
"n_automation": 2,
"n_rewrites": 0,
"n_structural": 2,
"automation_only": false,
"max_nesting": 2... | 3 | import Clean.Air.FlatEnsemble
import Clean.Air.OrderedChannel
variable {F : Type} [FiniteField F] [DecidableEq F]
variable {PublicIO : TypeMap} [ProvableType PublicIO]
/-
## VM ensembles
VM-like ensembles have a "main channel" that stores the VM state, which we'll call a _VM channel_.
One or more tables pull from, t... | import Clean.Air.FlatEnsemble
import Clean.Air.OrderedChannel
variable {F : Type} [FiniteField F] [DecidableEq F]
variable {PublicIO : TypeMap} [ProvableType PublicIO]
/-
## VM ensembles
VM-like ensembles have a "main channel" that stores the VM state, which we'll call a _VM channel_.
One or more tables pull from, t... | @@ -363,6 +363,13 @@
simp [pulls, interactionPairs]
tauto
+lemma mem_pushes_iff {witness : VmWitness vm} {push : Interaction F} :
+ push ∈ witness.pushes ↔
+ ∃ (table : Table F) (_ : table ∈ witness.allTables), ∃ row ∈ table.table,
+ push = vm.channel.pushedIfValue (witness.rowEnabled ‹_› row) (witness.r... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_8a2f653f613f_9 | 4c4888db592a835e | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/Vm.lean | Vm | 9 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 32 | 1 | [
{
"theorem_name": "pulls_zero_iff_pushes_zero",
"depth": 1,
"n_commands": 0,
"n_lines": 10,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro i hi_p hi_q\n simp only [pulls, pushes, List.getElem_map]\n have hi : i < witness.interactionPairs.leng... | [
{
"name": "mem_interactionPairs_iff",
"text": "lemma mem_interactionPairs_iff {witness : VmWitness vm} {pair : Interaction F × Interaction F} :\n pair ∈ witness.interactionPairs ↔\n ∃ (table : Table F) (_ : table ∈ witness.allTables), ∃ row ∈ table.table,\n pair = (vm.channel.pulledIfValue (witness.r... | [
{
"name": "pulls_zero_iff_pushes_zero",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 14,
"n_chars": 629,
"n_subproofs": 2,
"n_tactics": 10,
"cyclomatic": 2,
"n_automation": 3,
"n_rewrites": 2,
"n_structural": 2,
"automation_only": false,
... | 1 | import Clean.Air.FlatEnsemble
import Clean.Air.OrderedChannel
variable {F : Type} [FiniteField F] [DecidableEq F]
variable {PublicIO : TypeMap} [ProvableType PublicIO]
/-
## VM ensembles
VM-like ensembles have a "main channel" that stores the VM state, which we'll call a _VM channel_.
One or more tables pull from, t... | import Clean.Air.FlatEnsemble
import Clean.Air.OrderedChannel
variable {F : Type} [FiniteField F] [DecidableEq F]
variable {PublicIO : TypeMap} [ProvableType PublicIO]
/-
## VM ensembles
VM-like ensembles have a "main channel" that stores the VM state, which we'll call a _VM channel_.
One or more tables pull from, t... | @@ -342,6 +342,14 @@
(vm.channel.pulledIfValue (witness.rowEnabled ‹_› row) (witness.rowPull ‹_› row),
vm.channel.pushedIfValue (witness.rowEnabled ‹_› row) (witness.rowPush ‹_› row))
+lemma mem_interactionPairs_iff {witness : VmWitness vm} {pair : Interaction F × Interaction F} :
+ pair ∈ witness.in... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_8a2f653f613f_10 | 006922b53895eab1 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/Vm.lean | Vm | 10 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 32 | 2 | [
{
"theorem_name": "verifierInteractionsWith_eq",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simpa only [step] using interactionsWith_eq Ensemble.mem_allTables_verifierTable",
"n_chars": 86,
"n_su... | [
{
"name": "interactionsWith_eq",
"text": "lemma interactionsWith_eq {vm : VmTables F PublicIO} {table} (_ : table ∈ vm.allTables) :\n table.operations.interactionsWith vm.channel.toRaw = [\n (vm.channel.pulledIf (vm.step ‹_›).enabled (vm.step ‹_›).pull).toRaw,\n (vm.channel.pushedIf (vm.step ‹_›).ena... | [
{
"name": "interactions_eq_pulls_pushes",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 9,
"n_lines": 7,
"n_chars": 277,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 1,
"n_structural": 0,
"automation_only": false,
... | 8 | import Clean.Air.FlatEnsemble
import Clean.Air.OrderedChannel
variable {F : Type} [FiniteField F] [DecidableEq F]
variable {PublicIO : TypeMap} [ProvableType PublicIO]
/-
## VM ensembles
VM-like ensembles have a "main channel" that stores the VM state, which we'll call a _VM channel_.
One or more tables pull from, t... | import Clean.Air.FlatEnsemble
import Clean.Air.OrderedChannel
variable {F : Type} [FiniteField F] [DecidableEq F]
variable {PublicIO : TypeMap} [ProvableType PublicIO]
/-
## VM ensembles
VM-like ensembles have a "main channel" that stores the VM state, which we'll call a _VM channel_.
One or more tables pull from, t... | @@ -286,10 +286,18 @@
· simp only [circuit_norm, step, h, reduceDIte] at ⊢ table_mem
exact vm.tables_channel' table_mem
+lemma interactionsWith_eq {vm : VmTables F PublicIO} {table} (_ : table ∈ vm.allTables) :
+ table.operations.interactionsWith vm.channel.toRaw = [
+ (vm.channel.pulledIf (vm.step ‹_›).e... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_8a2f653f613f_11 | 143c893f465076eb | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/Vm.lean | Vm | 11 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 32 | 2 | [
{
"theorem_name": "activeInteractions_pulls_length_pos",
"depth": 1,
"n_commands": 0,
"n_lines": 5,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp_rw [activeInteractions, ←List.countP_eq_length_filter, List.countP_pos_iff]\n use witness.pulls[0... | [
{
"name": "verifierEnabled_eq_one",
"text": "lemma verifierEnabled_eq_one (witness : VmWitness vm) : witness.verifierEnabled = 1 := by\n simp only [verifierEnabled, VmTables.verifierStep, circuit_norm]\n\n",
"fan_in": 2,
"n_lines": 4,
"n_chars": 158,
"n_subproofs": 0,
"n_tactics": 2,
... | [
{
"name": "activeInteractions_pulls_length_pos",
"fan_in": 1,
"n_deps_direct": 3,
"n_deps_transitive": 4,
"n_lines": 8,
"n_chars": 369,
"n_subproofs": 0,
"n_tactics": 5,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 1,
"automation_only": fal... | 2 | import Clean.Air.FlatEnsemble
import Clean.Air.OrderedChannel
variable {F : Type} [FiniteField F] [DecidableEq F]
variable {PublicIO : TypeMap} [ProvableType PublicIO]
/-
## VM ensembles
VM-like ensembles have a "main channel" that stores the VM state, which we'll call a _VM channel_.
One or more tables pull from, t... | import Clean.Air.FlatEnsemble
import Clean.Air.OrderedChannel
variable {F : Type} [FiniteField F] [DecidableEq F]
variable {PublicIO : TypeMap} [ProvableType PublicIO]
/-
## VM ensembles
VM-like ensembles have a "main channel" that stores the VM state, which we'll call a _VM channel_.
One or more tables pull from, t... | @@ -319,6 +319,9 @@
noncomputable def verifierEnabled (witness : VmWitness vm) : F :=
eval (Environment.fromInput witness.publicInput witness.data) vm.verifierStep.enabled
+lemma verifierEnabled_eq_one (witness : VmWitness vm) : witness.verifierEnabled = 1 := by
+ simp only [verifierEnabled, VmTables.verifierSte... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_2fda73c47d13_0 | 2511320cfc119e66 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Gadgets/SHA256/LowerSigma0.lean | LowerSigma0 | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 12 | 5 | [
{
"theorem_name": "testBit_binary_sum",
"depth": 1,
"n_commands": 0,
"n_lines": 19,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n induction n with\n | zero => exact k.elim0\n | succ m ih =>\n rw [Fin.sum_univ_castSucc]; simp only [Fin.val_castS... | [
{
"name": "sum_bool_lt_two_pow",
"text": "lemma sum_bool_lt_two_pow (n : ℕ) (f : Fin n → ℕ) (hf : ∀ i, f i ≤ 1) :\n ∑ i : Fin n, f i * 2^i.val < 2^n := by\n induction n with\n | zero => simp\n | succ m ih =>\n rw [Fin.sum_univ_castSucc]; simp only [Fin.val_castSucc, Fin.val_last]\n have ihm : ∑ ... | [
{
"name": "testBit_binary_sum",
"fan_in": 3,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 22,
"n_chars": 1110,
"n_subproofs": 4,
"n_tactics": 25,
"cyclomatic": 6,
"n_automation": 7,
"n_rewrites": 6,
"n_structural": 4,
"automation_only": false,
"max_n... | 1 | import Clean.Gadgets.SHA256.Xor32
import Clean.Specs.SHA256
import Clean.Utils.Rotation
import Clean.Utils.Bits
import Clean.Utils.Fin
section
variable {p : ℕ} [Fact p.Prime]
namespace Gadgets.SHA256
/-!
# σ₀ (lower sigma 0) for SHA-256
σ₀(x) = ROTR7(x) XOR ROTR18(x) XOR SHR3(x)
Two xor32 calls = 64 witnesses tota... | import Clean.Gadgets.SHA256.Xor32
import Clean.Specs.SHA256
import Clean.Utils.Rotation
import Clean.Utils.Bits
import Clean.Utils.Fin
section
variable {p : ℕ} [Fact p.Prime]
namespace Gadgets.SHA256
/-!
# σ₀ (lower sigma 0) for SHA-256
σ₀(x) = ROTR7(x) XOR ROTR18(x) XOR SHR3(x)
Two xor32 calls = 64 witnesses tota... | @@ -36,6 +36,19 @@
/-! ## Helper lemmas (adapted from Xor32) -/
+lemma sum_bool_lt_two_pow (n : ℕ) (f : Fin n → ℕ) (hf : ∀ i, f i ≤ 1) :
+ ∑ i : Fin n, f i * 2^i.val < 2^n := by
+ induction n with
+ | zero => simp
+ | succ m ih =>
+ rw [Fin.sum_univ_castSucc]; simp only [Fin.val_castSucc, Fin.val_last]
+ ... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_2fda73c47d13_1 | 5c751e9a52d1bc55 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Gadgets/SHA256/LowerSigma0.lean | LowerSigma0 | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 12 | 3 | [
{
"theorem_name": "bool_finsum_xor_eq",
"depth": 1,
"n_commands": 0,
"n_lines": 16,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n apply Nat.eq_of_testBit_eq; intro j\n by_cases hj : j < n\n · have hfg : ∀ i : Fin n, (f i ^^^ g i) = 0 ∨ (f i ^^^ g ... | [
{
"name": "testBit_binary_sum",
"text": "lemma testBit_binary_sum (n : ℕ) (f : Fin n → ℕ) (hf : ∀ i, f i = 0 ∨ f i = 1) (k : Fin n) :\n Nat.testBit (∑ i : Fin n, f i * 2^i.val) k.val = decide (f k = 1) := by\n induction n with\n | zero => exact k.elim0\n | succ m ih =>\n rw [Fin.sum_univ_castSucc];... | [
{
"name": "bool_finsum_xor_eq",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 21,
"n_chars": 1325,
"n_subproofs": 5,
"n_tactics": 26,
"cyclomatic": 17,
"n_automation": 6,
"n_rewrites": 2,
"n_structural": 11,
"automation_only": false,
"max... | 2 | import Clean.Gadgets.SHA256.Xor32
import Clean.Specs.SHA256
import Clean.Utils.Rotation
import Clean.Utils.Bits
import Clean.Utils.Fin
section
variable {p : ℕ} [Fact p.Prime]
namespace Gadgets.SHA256
/-!
# σ₀ (lower sigma 0) for SHA-256
σ₀(x) = ROTR7(x) XOR ROTR18(x) XOR SHR3(x)
Two xor32 calls = 64 witnesses tota... | import Clean.Gadgets.SHA256.Xor32
import Clean.Specs.SHA256
import Clean.Utils.Rotation
import Clean.Utils.Bits
import Clean.Utils.Fin
section
variable {p : ℕ} [Fact p.Prime]
namespace Gadgets.SHA256
/-!
# σ₀ (lower sigma 0) for SHA-256
σ₀(x) = ROTR7(x) XOR ROTR18(x) XOR SHR3(x)
Two xor32 calls = 64 witnesses tota... | @@ -49,13 +49,38 @@
have h2 : 2^m + 2^m = 2^(m+1) := by ring
omega
+lemma testBit_binary_sum (n : ℕ) (f : Fin n → ℕ) (hf : ∀ i, f i = 0 ∨ f i = 1) (k : Fin n) :
+ Nat.testBit (∑ i : Fin n, f i * 2^i.val) k.val = decide (f k = 1) := by
+ induction n with
+ | zero => exact k.elim0
+ | succ m ih =>
+ ... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_2fda73c47d13_2 | c390a33dc0543c44 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Gadgets/SHA256/LowerSigma0.lean | LowerSigma0 | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 12 | 3 | [
{
"theorem_name": "bool_finsum_xor_eq",
"depth": 1,
"n_commands": 0,
"n_lines": 16,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n apply Nat.eq_of_testBit_eq; intro j\n by_cases hj : j < n\n · have hfg : ∀ i : Fin n, (f i ^^^ g i) = 0 ∨ (f i ^^^ g ... | [
{
"name": "testBit_binary_sum",
"text": "lemma testBit_binary_sum (n : ℕ) (f : Fin n → ℕ) (hf : ∀ i, f i = 0 ∨ f i = 1) (k : Fin n) :\n Nat.testBit (∑ i : Fin n, f i * 2^i.val) k.val = decide (f k = 1) := by\n induction n with\n | zero => exact k.elim0\n | succ m ih =>\n rw [Fin.sum_univ_castSucc];... | [
{
"name": "sum_mod_two_pow",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 30,
"n_chars": 1397,
"n_subproofs": 4,
"n_tactics": 28,
"cyclomatic": 7,
"n_automation": 6,
"n_rewrites": 3,
"n_structural": 6,
"automation_only": false,
"max_nest... | 2 | import Clean.Gadgets.SHA256.Xor32
import Clean.Specs.SHA256
import Clean.Utils.Rotation
import Clean.Utils.Bits
import Clean.Utils.Fin
section
variable {p : ℕ} [Fact p.Prime]
namespace Gadgets.SHA256
/-!
# σ₀ (lower sigma 0) for SHA-256
σ₀(x) = ROTR7(x) XOR ROTR18(x) XOR SHR3(x)
Two xor32 calls = 64 witnesses tota... | import Clean.Gadgets.SHA256.Xor32
import Clean.Specs.SHA256
import Clean.Utils.Rotation
import Clean.Utils.Bits
import Clean.Utils.Fin
section
variable {p : ℕ} [Fact p.Prime]
namespace Gadgets.SHA256
/-!
# σ₀ (lower sigma 0) for SHA-256
σ₀(x) = ROTR7(x) XOR ROTR18(x) XOR SHR3(x)
Two xor32 calls = 64 witnesses tota... | @@ -49,13 +49,38 @@
have h2 : 2^m + 2^m = 2^(m+1) := by ring
omega
+lemma testBit_binary_sum (n : ℕ) (f : Fin n → ℕ) (hf : ∀ i, f i = 0 ∨ f i = 1) (k : Fin n) :
+ Nat.testBit (∑ i : Fin n, f i * 2^i.val) k.val = decide (f k = 1) := by
+ induction n with
+ | zero => exact k.elim0
+ | succ m ih =>
+ ... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_2fda73c47d13_3 | 9295586ce500e734 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Gadgets/SHA256/LowerSigma0.lean | LowerSigma0 | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 12 | 1 | [
{
"theorem_name": "valueBits_rotate",
"depth": 1,
"n_commands": 0,
"n_lines": 33,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n set bits : Vector ℕ 32 := x.map ZMod.val with hbits_def\n have hbits_bool : ∀ (i : ℕ) (hi : i < 32), bits[i] = 0 ∨ bits[... | [
{
"name": "valueBits_eq_fromBits",
"text": "lemma valueBits_eq_fromBits (x : fields 32 (F p)) :\n valueBits x = Utils.Bits.fromBits (x.map ZMod.val) := by\n simp only [valueBits, Utils.Bits.fromBits, Fin.foldl_to_sum]\n congr 1; ext (i : Fin 32); rw [Vector.getElem_map]; rfl\n\n",
"fan_in": 1,
... | [
{
"name": "valueBits_rotate",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 37,
"n_chars": 1729,
"n_subproofs": 7,
"n_tactics": 34,
"cyclomatic": 2,
"n_automation": 2,
"n_rewrites": 12,
"n_structural": 8,
"automation_only": false,
"max_ne... | 1 | import Clean.Gadgets.SHA256.Xor32
import Clean.Specs.SHA256
import Clean.Utils.Rotation
import Clean.Utils.Bits
import Clean.Utils.Fin
section
variable {p : ℕ} [Fact p.Prime]
namespace Gadgets.SHA256
/-!
# σ₀ (lower sigma 0) for SHA-256
σ₀(x) = ROTR7(x) XOR ROTR18(x) XOR SHR3(x)
Two xor32 calls = 64 witnesses tota... | import Clean.Gadgets.SHA256.Xor32
import Clean.Specs.SHA256
import Clean.Utils.Rotation
import Clean.Utils.Bits
import Clean.Utils.Fin
section
variable {p : ℕ} [Fact p.Prime]
namespace Gadgets.SHA256
/-!
# σ₀ (lower sigma 0) for SHA-256
σ₀(x) = ROTR7(x) XOR ROTR18(x) XOR SHR3(x)
Two xor32 calls = 64 witnesses tota... | @@ -99,9 +99,46 @@
· rw [h, ZMod.val_zero]; exact Nat.zero_le _
· rw [h, ZMod.val_one])
+lemma valueBits_eq_fromBits (x : fields 32 (F p)) :
+ valueBits x = Utils.Bits.fromBits (x.map ZMod.val) := by
+ simp only [valueBits, Utils.Bits.fromBits, Fin.foldl_to_sum]
+ congr 1; ext (i : Fin 32); rw [Vector.... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_2fda73c47d13_4 | f78c1cb82b8601ee | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Gadgets/SHA256/LowerSigma0.lean | LowerSigma0 | 4 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 12 | 1 | [
{
"theorem_name": "valueBits_rotr32_eq",
"depth": 1,
"n_commands": 0,
"n_lines": 9,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rw [← valueBits_rotate x hx k.val]\n -- LHS sum = valueBits (x.rotate k.val) by definition (modulo Fin add ↔ Nat mod)\... | [
{
"name": "valueBits_rotate",
"text": "/-- `valueBits` of a rotated bit-vector equals `rotRight32` of the original `valueBits`. -/\nlemma valueBits_rotate (x : fields 32 (F p)) (hx : Normalized x) (k : ℕ) :\n valueBits (x.rotate k) = rotRight32 (valueBits x) k := by\n set bits : Vector ℕ 32 := x.map ZMo... | [
{
"name": "valueBits_rotr32_eq",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 2,
"n_lines": 15,
"n_chars": 638,
"n_subproofs": 0,
"n_tactics": 8,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 4,
"n_structural": 2,
"automation_only": false,
"max_ne... | 2 | import Clean.Gadgets.SHA256.Xor32
import Clean.Specs.SHA256
import Clean.Utils.Rotation
import Clean.Utils.Bits
import Clean.Utils.Fin
section
variable {p : ℕ} [Fact p.Prime]
namespace Gadgets.SHA256
/-!
# σ₀ (lower sigma 0) for SHA-256
σ₀(x) = ROTR7(x) XOR ROTR18(x) XOR SHR3(x)
Two xor32 calls = 64 witnesses tota... | import Clean.Gadgets.SHA256.Xor32
import Clean.Specs.SHA256
import Clean.Utils.Rotation
import Clean.Utils.Bits
import Clean.Utils.Fin
section
variable {p : ℕ} [Fact p.Prime]
namespace Gadgets.SHA256
/-!
# σ₀ (lower sigma 0) for SHA-256
σ₀(x) = ROTR7(x) XOR ROTR18(x) XOR SHR3(x)
Two xor32 calls = 64 witnesses tota... | @@ -104,9 +104,53 @@
simp only [valueBits, Utils.Bits.fromBits, Fin.foldl_to_sum]
congr 1; ext (i : Fin 32); rw [Vector.getElem_map]; rfl
+/-- `valueBits` of a rotated bit-vector equals `rotRight32` of the original `valueBits`. -/
+lemma valueBits_rotate (x : fields 32 (F p)) (hx : Normalized x) (k : ℕ) :
+ ... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_2fda73c47d13_5 | ed635028c1e3d49a | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Gadgets/SHA256/LowerSigma0.lean | LowerSigma0 | 5 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 12 | 1 | [
{
"theorem_name": "valueBits_shr32_eq",
"depth": 1,
"n_commands": 0,
"n_lines": 34,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hbool : ∀ i : Fin 32, (x[i] : F p).val = 0 ∨ (x[i] : F p).val = 1 :=\n fun i => by rcases hx i with h | h <;> s... | [
{
"name": "valueBits_lt_two_pow",
"text": "/-- valueBits of a normalized vector is < 2^32 -/\nlemma valueBits_lt_two_pow (x : fields 32 (F p)) (hx : Normalized x) :\n valueBits x < 2^32 :=\n sum_bool_lt_two_pow 32 (fun i => (x[i] : F p).val) (fun i => by\n show (x[i] : F p).val ≤ 1\n rcases hx i w... | [
{
"name": "valueBits_shr32_eq",
"fan_in": 1,
"n_deps_direct": 3,
"n_deps_transitive": 3,
"n_lines": 39,
"n_chars": 2033,
"n_subproofs": 7,
"n_tactics": 41,
"cyclomatic": 9,
"n_automation": 11,
"n_rewrites": 4,
"n_structural": 10,
"automation_only": false,
"max... | 3 | import Clean.Gadgets.SHA256.Xor32
import Clean.Specs.SHA256
import Clean.Utils.Rotation
import Clean.Utils.Bits
import Clean.Utils.Fin
section
variable {p : ℕ} [Fact p.Prime]
namespace Gadgets.SHA256
/-!
# σ₀ (lower sigma 0) for SHA-256
σ₀(x) = ROTR7(x) XOR ROTR18(x) XOR SHR3(x)
Two xor32 calls = 64 witnesses tota... | import Clean.Gadgets.SHA256.Xor32
import Clean.Specs.SHA256
import Clean.Utils.Rotation
import Clean.Utils.Bits
import Clean.Utils.Fin
section
variable {p : ℕ} [Fact p.Prime]
namespace Gadgets.SHA256
/-!
# σ₀ (lower sigma 0) for SHA-256
σ₀(x) = ROTR7(x) XOR ROTR18(x) XOR SHR3(x)
Two xor32 calls = 64 witnesses tota... | @@ -90,6 +90,15 @@
rw [Nat.testBit_eq_false_of_lt (Nat.lt_of_lt_of_le hfgS pow_le),
Nat.testBit_eq_false_of_lt (Nat.lt_of_lt_of_le (Nat.xor_lt_two_pow hfS hgS) pow_le)]
+/-- valueBits of a normalized vector is < 2^32 -/
+lemma valueBits_lt_two_pow (x : fields 32 (F p)) (hx : Normalized x) :
+ valueBi... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_2fda73c47d13_6 | e17b0b4d4f9f406b | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Gadgets/SHA256/LowerSigma0.lean | LowerSigma0 | 6 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 12 | 2 | [
{
"theorem_name": "spec_of_constraint",
"depth": 1,
"n_commands": 0,
"n_lines": 77,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have ha_val : ∀ i : Fin 32, (input[i] : F p).val = 0 ∨ (input[i] : F p).val = 1 :=\n fun i => by rcases hx i with h ... | [
{
"name": "shr_isbool",
"text": "lemma shr_isbool (k : ℕ) (input : fields 32 (F p)) (ha : Normalized input) (i : Fin 32) :\n (if h : i.val + k < 32 then input[i.val + k]'h else (0 : F p)) = 0 ∨\n (if h : i.val + k < 32 then input[i.val + k]'h else (0 : F p)) = 1 := by\n split\n · next h => exact ha ... | [
{
"name": "spec_of_constraint",
"fan_in": 1,
"n_deps_direct": 4,
"n_deps_transitive": 9,
"n_lines": 91,
"n_chars": 4929,
"n_subproofs": 14,
"n_tactics": 79,
"cyclomatic": 9,
"n_automation": 9,
"n_rewrites": 10,
"n_structural": 12,
"automation_only": false,
"ma... | 9 | import Clean.Gadgets.SHA256.Xor32
import Clean.Specs.SHA256
import Clean.Utils.Rotation
import Clean.Utils.Bits
import Clean.Utils.Fin
section
variable {p : ℕ} [Fact p.Prime]
namespace Gadgets.SHA256
/-!
# σ₀ (lower sigma 0) for SHA-256
σ₀(x) = ROTR7(x) XOR ROTR18(x) XOR SHR3(x)
Two xor32 calls = 64 witnesses tota... | import Clean.Gadgets.SHA256.Xor32
import Clean.Specs.SHA256
import Clean.Utils.Rotation
import Clean.Utils.Bits
import Clean.Utils.Fin
section
variable {p : ℕ} [Fact p.Prime]
namespace Gadgets.SHA256
/-!
# σ₀ (lower sigma 0) for SHA-256
σ₀(x) = ROTR7(x) XOR ROTR18(x) XOR SHR3(x)
Two xor32 calls = 64 witnesses tota... | @@ -212,6 +212,15 @@
· next h => rw [Vector.getElem_map]
· rfl
+lemma shr_isbool (k : ℕ) (input : fields 32 (F p)) (ha : Normalized input) (i : Fin 32) :
+ (if h : i.val + k < 32 then input[i.val + k]'h else (0 : F p)) = 0 ∨
+ (if h : i.val + k < 32 then input[i.val + k]'h else (0 : F p)) = 1 := by
+ spl... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_6df0321d5d7e_0 | 9f84f6226bca8f38 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Circuit/Loops.lean | Loops | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 18 | 3 | [
{
"theorem_name": "localLength_eq",
"depth": 1,
"n_commands": 0,
"n_lines": 8,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n set k := constant.localLength\n induction xs using Vector.induct generalizing n\n case nil => ac_rfl\n case cons x xs ih ... | [
{
"name": "Vector.forM_toList",
"text": "lemma Vector.forM_toList (xs : Vector α n) {m : Type → Type} [Monad m] (body : α → m Unit) :\n xs.forM body = forM xs.toList body := by\n rw [Vector.forM_eq_forM, Vector.forM_mk, List.forM_toArray, List.forM_eq_forM]; rfl\n\n",
"fan_in": 3,
"n_lines": 5,
... | [
{
"name": "ConstantLength.length_eq_default",
"fan_in": 3,
"n_deps_direct": 1,
"n_deps_transitive": 2,
"n_lines": 5,
"n_chars": 250,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,
... | 1 | /-
This file proves some properties about `forM`, `mapM`, and `foldlM` monad loops when used in a `Circuit`,
typically leveraging a `ConstantLength` assumption on the loop body.
The end result are loop methods `Circuit.{mapFinRange, map, forEach, foldl}` that simplify
under `circuit_norm` in every way we need them to.... | /-
This file proves some properties about `forM`, `mapM`, and `foldlM` monad loops when used in a `Circuit`,
typically leveraging a `ConstantLength` assumption on the loop body.
The end result are loop methods `Circuit.{mapFinRange, map, forEach, foldl}` that simplify
under `circuit_norm` in every way we need them to.... | @@ -13,6 +13,10 @@
variable {n m : ℕ} {F : Type} [FiniteField F] {α β : Type}
+lemma Vector.forM_toList (xs : Vector α n) {m : Type → Type} [Monad m] (body : α → m Unit) :
+ xs.forM body = forM xs.toList body := by
+ rw [Vector.forM_eq_forM, Vector.forM_mk, List.forM_toArray, List.forM_eq_forM]; rfl
+
lemma V... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_6df0321d5d7e_1 | e7771ee847026b95 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Circuit/Loops.lean | Loops | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 18 | 3 | [
{
"theorem_name": "localLength_eq",
"depth": 1,
"n_commands": 0,
"n_lines": 8,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n set k := constant.localLength\n induction xs using Vector.induct generalizing n\n case nil => ac_rfl\n case cons x xs ih ... | [
{
"name": "Vector.forM_toList",
"text": "lemma Vector.forM_toList (xs : Vector α n) {m : Type → Type} [Monad m] (body : α → m Unit) :\n xs.forM body = forM xs.toList body := by\n rw [Vector.forM_eq_forM, Vector.forM_mk, List.forM_toArray, List.forM_eq_forM]; rfl\n\n",
"fan_in": 3,
"n_lines": 5,
... | [
{
"name": "foldlAcc_const",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 4,
"n_lines": 11,
"n_chars": 433,
"n_subproofs": 0,
"n_tactics": 4,
"cyclomatic": 2,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 1,
"automation_only": false,
"max_nesting... | 3 | /-
This file proves some properties about `forM`, `mapM`, and `foldlM` monad loops when used in a `Circuit`,
typically leveraging a `ConstantLength` assumption on the loop body.
The end result are loop methods `Circuit.{mapFinRange, map, forEach, foldl}` that simplify
under `circuit_norm` in every way we need them to.... | /-
This file proves some properties about `forM`, `mapM`, and `foldlM` monad loops when used in a `Circuit`,
typically leveraging a `ConstantLength` assumption on the loop body.
The end result are loop methods `Circuit.{mapFinRange, map, forEach, foldl}` that simplify
under `circuit_norm` in every way we need them to.... | @@ -13,6 +13,10 @@
variable {n m : ℕ} {F : Type} [FiniteField F] {α β : Type}
+lemma Vector.forM_toList (xs : Vector α n) {m : Type → Type} [Monad m] (body : α → m Unit) :
+ xs.forM body = forM xs.toList body := by
+ rw [Vector.forM_eq_forM, Vector.forM_mk, List.forM_toArray, List.forM_eq_forM]; rfl
+
lemma V... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_6df0321d5d7e_2 | c123a87e14ec3802 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Circuit/Loops.lean | Loops | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 18 | 3 | [
{
"theorem_name": "localLength_eq",
"depth": 1,
"n_commands": 0,
"n_lines": 8,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n set k := constant.localLength\n induction xs using Vector.induct generalizing n\n case nil => ac_rfl\n case cons x xs ih ... | [
{
"name": "Vector.forM_toList",
"text": "lemma Vector.forM_toList (xs : Vector α n) {m : Type → Type} [Monad m] (body : α → m Unit) :\n xs.forM body = forM xs.toList body := by\n rw [Vector.forM_eq_forM, Vector.forM_mk, List.forM_toArray, List.forM_eq_forM]; rfl\n\n",
"fan_in": 3,
"n_lines": 5,
... | [
{
"name": "operations_eq_const",
"fan_in": 0,
"n_deps_direct": 4,
"n_deps_transitive": 7,
"n_lines": 26,
"n_chars": 1068,
"n_subproofs": 1,
"n_tactics": 18,
"cyclomatic": 3,
"n_automation": 5,
"n_rewrites": 6,
"n_structural": 3,
"automation_only": false,
"max_... | 5 | /-
This file proves some properties about `forM`, `mapM`, and `foldlM` monad loops when used in a `Circuit`,
typically leveraging a `ConstantLength` assumption on the loop body.
The end result are loop methods `Circuit.{mapFinRange, map, forEach, foldl}` that simplify
under `circuit_norm` in every way we need them to.... | /-
This file proves some properties about `forM`, `mapM`, and `foldlM` monad loops when used in a `Circuit`,
typically leveraging a `ConstantLength` assumption on the loop body.
The end result are loop methods `Circuit.{mapFinRange, map, forEach, foldl}` that simplify
under `circuit_norm` in every way we need them to.... | @@ -13,6 +13,10 @@
variable {n m : ℕ} {F : Type} [FiniteField F] {α β : Type}
+lemma Vector.forM_toList (xs : Vector α n) {m : Type → Type} [Monad m] (body : α → m Unit) :
+ xs.forM body = forM xs.toList body := by
+ rw [Vector.forM_eq_forM, Vector.forM_mk, List.forM_toArray, List.forM_eq_forM]; rfl
+
lemma V... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_6df0321d5d7e_3 | 760c9a11451d6664 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Circuit/Loops.lean | Loops | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 18 | 3 | [
{
"theorem_name": "localLength_eq",
"depth": 1,
"n_commands": 0,
"n_lines": 8,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n set k := constant.localLength\n induction xs using Vector.induct generalizing n\n case nil => ac_rfl\n case cons x xs ih ... | [
{
"name": "Vector.forM_toList",
"text": "lemma Vector.forM_toList (xs : Vector α n) {m : Type → Type} [Monad m] (body : α → m Unit) :\n xs.forM body = forM xs.toList body := by\n rw [Vector.forM_eq_forM, Vector.forM_mk, List.forM_toArray, List.forM_eq_forM]; rfl\n\n",
"fan_in": 3,
"n_lines": 5,
... | [
{
"name": "forEach_cons",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 9,
"n_chars": 366,
"n_subproofs": 0,
"n_tactics": 5,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 3,
"n_structural": 0,
"automation_only": false,
"max_nesting": ... | 1 | /-
This file proves some properties about `forM`, `mapM`, and `foldlM` monad loops when used in a `Circuit`,
typically leveraging a `ConstantLength` assumption on the loop body.
The end result are loop methods `Circuit.{mapFinRange, map, forEach, foldl}` that simplify
under `circuit_norm` in every way we need them to.... | /-
This file proves some properties about `forM`, `mapM`, and `foldlM` monad loops when used in a `Circuit`,
typically leveraging a `ConstantLength` assumption on the loop body.
The end result are loop methods `Circuit.{mapFinRange, map, forEach, foldl}` that simplify
under `circuit_norm` in every way we need them to.... | @@ -13,6 +13,10 @@
variable {n m : ℕ} {F : Type} [FiniteField F] {α β : Type}
+lemma Vector.forM_toList (xs : Vector α n) {m : Type → Type} [Monad m] (body : α → m Unit) :
+ xs.forM body = forM xs.toList body := by
+ rw [Vector.forM_eq_forM, Vector.forM_mk, List.forM_toArray, List.forM_eq_forM]; rfl
+
lemma V... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_6bbd8e9fc6f4_0 | 886fbd688b99c201 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Gadgets/And/And8.lean | And8 | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 4 | 4 | [
{
"theorem_name": "xor_le_add",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rw [←and_times_two_add_xor hx hy]; linarith",
"n_chars": 51,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
... | [
{
"name": "and_times_two_add_xor",
"text": "theorem and_times_two_add_xor {x y : ℕ} (hx : x < 256) (hy : y < 256) : 2 * (x &&& y) + (x ^^^ y) = x + y := by\n -- proof strategy: prove a UInt16 version of the identity using `bv_decide`,\n -- and show that the UInt16 identity is the same as the Nat version s... | [
{
"name": "xor_le_add",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 4,
"n_chars": 136,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 0,
"automation_only": false,
"max_nesting": 2
... | 1 | import Clean.Circuit
import Clean.Gadgets.Xor.ByteXorTable
import Clean.Utils.Primes
variable {p : ℕ} [Fact p.Prime] [p_large_enough: Fact (p > 512)]
namespace Gadgets.And.And8
open Xor (ByteXorTable)
open FieldUtils
structure Inputs (F : Type) where
x: F
y: F
deriving ProvableStruct
def Assumptions (input : In... | import Clean.Circuit
import Clean.Gadgets.Xor.ByteXorTable
import Clean.Utils.Primes
variable {p : ℕ} [Fact p.Prime] [p_large_enough: Fact (p > 512)]
namespace Gadgets.And.And8
open Xor (ByteXorTable)
open FieldUtils
structure Inputs (F : Type) where
x: F
y: F
deriving ProvableStruct
def Assumptions (input : In... | @@ -31,10 +31,38 @@
-- AND / XOR identity that justifies the circuit
-theorem xor_le_add {x y : ℕ} (hx : x < 256) (hy : y < 256) : x ^^^ y ≤ x + y := sorry
+theorem and_times_two_add_xor {x y : ℕ} (hx : x < 256) (hy : y < 256) : 2 * (x &&& y) + (x ^^^ y) = x + y := by
+ -- proof strategy: prove a UInt16 version o... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_6bbd8e9fc6f4_1 | 742e60ac74f87bf6 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Gadgets/And/And8.lean | And8 | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 4 | 2 | [
{
"theorem_name": "two_non_zero",
"depth": 1,
"n_commands": 0,
"n_lines": 4,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n apply_fun ZMod.val\n rw [val_two, ZMod.val_zero]\n trivial",
"n_chars": 64,
"n_subproofs": 0,
"n_tactics": 4,
... | [
{
"name": "val_two",
"text": "lemma val_two : (2 : F p).val = 2 := val_lt_p 2 (by linarith [p_large_enough.elim])\n\n",
"fan_in": 2,
"n_lines": 3,
"n_chars": 85,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
... | [
{
"name": "two_non_zero",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 6,
"n_chars": 105,
"n_subproofs": 0,
"n_tactics": 4,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 0,
"automation_only": false,
"max_nesting": ... | 1 | import Clean.Circuit
import Clean.Gadgets.Xor.ByteXorTable
import Clean.Utils.Primes
variable {p : ℕ} [Fact p.Prime] [p_large_enough: Fact (p > 512)]
namespace Gadgets.And.And8
open Xor (ByteXorTable)
open FieldUtils
structure Inputs (F : Type) where
x: F
y: F
deriving ProvableStruct
def Assumptions (input : In... | import Clean.Circuit
import Clean.Gadgets.Xor.ByteXorTable
import Clean.Utils.Primes
variable {p : ℕ} [Fact p.Prime] [p_large_enough: Fact (p > 512)]
namespace Gadgets.And.And8
open Xor (ByteXorTable)
open FieldUtils
structure Inputs (F : Type) where
x: F
y: F
deriving ProvableStruct
def Assumptions (input : In... | @@ -64,8 +64,13 @@
rw [←and_times_two_add_xor hx hy]; linarith
-- some helper lemmas about 2
-lemma two_non_zero : (2 : F p) ≠ 0 := sorry
+lemma val_two : (2 : F p).val = 2 := val_lt_p 2 (by linarith [p_large_enough.elim])
+lemma two_non_zero : (2 : F p) ≠ 0 := by
+ apply_fun ZMod.val
+ rw [val_two, ZMod.val_... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_0d583426af46_0 | 94a0a02fea3d62ca | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Gadgets/Or/Or8.lean | Or8 | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 4 | 3 | [
{
"theorem_name": "or_times_two_sub_xor'",
"depth": 1,
"n_commands": 0,
"n_lines": 3,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have := or_times_two_sub_xor hx hy\n omega",
"n_chars": 48,
"n_subproofs": 1,
"n_tactics": 3,
"cyclo... | [
{
"name": "or_times_two_sub_xor",
"text": "private theorem or_times_two_sub_xor {x y : ℕ} (hx : x < 256) (hy : y < 256) :\n 2 * (x ||| y) = x + y + (x ^^^ y) := by\n -- proof strategy: prove a UInt16 version of the identity using `bv_decide`,\n -- and show that the UInt16 identity is the same as the Na... | [
{
"name": "or_times_two_sub_xor'",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 8,
"n_chars": 206,
"n_subproofs": 1,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,
"max_n... | 1 | import Clean.Circuit
import Clean.Gadgets.Xor.ByteXorTable
variable {p : ℕ} [Fact p.Prime] [p_large_enough: Fact (p > 512)]
namespace Gadgets.Or.Or8
open Xor (ByteXorTable)
open FieldUtils
structure Inputs (F : Type) where
x: F
y: F
deriving ProvableStruct
def Assumptions (input : Inputs (F p)) :=
let ⟨x, y⟩ ... | import Clean.Circuit
import Clean.Gadgets.Xor.ByteXorTable
variable {p : ℕ} [Fact p.Prime] [p_large_enough: Fact (p > 512)]
namespace Gadgets.Or.Or8
open Xor (ByteXorTable)
open FieldUtils
structure Inputs (F : Type) where
x: F
y: F
deriving ProvableStruct
def Assumptions (input : Inputs (F p)) :=
let ⟨x, y⟩ ... | @@ -29,12 +29,50 @@
return or
-- OR / XOR identity that justifies the circuit
+private theorem or_times_two_sub_xor {x y : ℕ} (hx : x < 256) (hy : y < 256) :
+ 2 * (x ||| y) = x + y + (x ^^^ y) := by
+ -- proof strategy: prove a UInt16 version of the identity using `bv_decide`,
+ -- and show that the UInt16 ... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_0d583426af46_1 | f1dae8671f5bc747 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Gadgets/Or/Or8.lean | Or8 | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 4 | 2 | [
{
"theorem_name": "two_non_zero",
"depth": 1,
"n_commands": 0,
"n_lines": 4,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n apply_fun ZMod.val\n rw [val_two, ZMod.val_zero]\n trivial",
"n_chars": 64,
"n_subproofs": 0,
"n_tactics": 4,
... | [
{
"name": "val_two",
"text": "lemma val_two : (2 : F p).val = 2 := val_lt_p 2 (by linarith [p_large_enough.elim])\n\n",
"fan_in": 2,
"n_lines": 3,
"n_chars": 85,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
... | [
{
"name": "two_non_zero",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 6,
"n_chars": 105,
"n_subproofs": 0,
"n_tactics": 4,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 0,
"automation_only": false,
"max_nesting": ... | 1 | import Clean.Circuit
import Clean.Gadgets.Xor.ByteXorTable
variable {p : ℕ} [Fact p.Prime] [p_large_enough: Fact (p > 512)]
namespace Gadgets.Or.Or8
open Xor (ByteXorTable)
open FieldUtils
structure Inputs (F : Type) where
x: F
y: F
deriving ProvableStruct
def Assumptions (input : Inputs (F p)) :=
let ⟨x, y⟩ ... | import Clean.Circuit
import Clean.Gadgets.Xor.ByteXorTable
variable {p : ℕ} [Fact p.Prime] [p_large_enough: Fact (p > 512)]
namespace Gadgets.Or.Or8
open Xor (ByteXorTable)
open FieldUtils
structure Inputs (F : Type) where
x: F
y: F
deriving ProvableStruct
def Assumptions (input : Inputs (F p)) :=
let ⟨x, y⟩ ... | @@ -75,8 +75,13 @@
linarith
-- some helper lemmas about 2
-lemma two_non_zero : (2 : F p) ≠ 0 := sorry
+lemma val_two : (2 : F p).val = 2 := val_lt_p 2 (by linarith [p_large_enough.elim])
+lemma two_non_zero : (2 : F p) ≠ 0 := by
+ apply_fun ZMod.val
+ rw [val_two, ZMod.val_zero]
+ trivial
+
instance elabor... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_0d583426af46_2 | cfa6646427ebfc9d | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Gadgets/Or/Or8.lean | Or8 | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 4 | 1 | [
{
"theorem_name": "completeness",
"depth": 1,
"n_commands": 0,
"n_lines": 48,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n circuit_proof_start [ByteXorTable]\n simp_all only [true_and]\n obtain ⟨ hx_byte, hy_byte ⟩ := h_assumptions\n set w : F p... | [
{
"name": "or_times_two_sub_xor'",
"text": "private theorem or_times_two_sub_xor' {x y : ℕ} (hx : x < 256) (hy : y < 256) :\n 2 * (x ||| y) - x - y = (x ^^^ y) := by\n have := or_times_two_sub_xor hx hy\n omega\n\n-- corollaries that we also need\n\n",
"fan_in": 1,
"n_lines": 8,
"n_chars": ... | [
{
"name": "completeness",
"fan_in": 0,
"n_deps_direct": 3,
"n_deps_transitive": 4,
"n_lines": 50,
"n_chars": 1704,
"n_subproofs": 9,
"n_tactics": 42,
"cyclomatic": 1,
"n_automation": 16,
"n_rewrites": 11,
"n_structural": 6,
"automation_only": false,
"max_nesti... | 4 | import Clean.Circuit
import Clean.Gadgets.Xor.ByteXorTable
variable {p : ℕ} [Fact p.Prime] [p_large_enough: Fact (p > 512)]
namespace Gadgets.Or.Or8
open Xor (ByteXorTable)
open FieldUtils
structure Inputs (F : Type) where
x: F
y: F
deriving ProvableStruct
def Assumptions (input : Inputs (F p)) :=
let ⟨x, y⟩ ... | import Clean.Circuit
import Clean.Gadgets.Xor.ByteXorTable
variable {p : ℕ} [Fact p.Prime] [p_large_enough: Fact (p > 512)]
namespace Gadgets.Or.Or8
open Xor (ByteXorTable)
open FieldUtils
structure Inputs (F : Type) where
x: F
y: F
deriving ProvableStruct
def Assumptions (input : Inputs (F p)) :=
let ⟨x, y⟩ ... | @@ -63,6 +63,13 @@
rw [Nat.mod_eq_of_lt h_lhs, Nat.mod_eq_of_lt h_rhs] at h_mod_2_to_16
exact h_mod_2_to_16
+private theorem or_times_two_sub_xor' {x y : ℕ} (hx : x < 256) (hy : y < 256) :
+ 2 * (x ||| y) - x - y = (x ^^^ y) := by
+ have := or_times_two_sub_xor hx hy
+ omega
+
+-- corollaries that we also ... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_ff68df906220_0 | f2826cf8bbc13947 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Gadgets/Rotation64/Theorems.lean | Theorems | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 3 | 1 | [
{
"theorem_name": "rotation64_bits_soundness",
"depth": 1,
"n_commands": 0,
"n_lines": 34,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n -- simplify the goal\n simp only [rotRight64, rotRight64_u64, U64.valueNat]\n\n have offset_mod_64 : o % 64 = ... | [
{
"name": "h_div",
"text": "lemma h_div {o : ℕ} (ho : o < 8) {x0 x1 x2 x3 x4 x5 x6 x7 : ℕ} :\n (x0 + x1 * 256 + x2 * 256^2 + x3 * 256^3 + x4 * 256^4 + x5 * 256^5 + x6 * 256^6 + x7 * 256^7) / 2 ^ o\n = x0 / 2^o + x1 * 2^(8-o) + x2 * 256 * 2^(8-o) + x3 * 256^2 * 2^(8-o) + x4 * 256^3 * 2^(8-o) +\n x5 ... | [
{
"name": "rotation64_bits_soundness",
"fan_in": 0,
"n_deps_direct": 3,
"n_deps_transitive": 3,
"n_lines": 37,
"n_chars": 1160,
"n_subproofs": 1,
"n_tactics": 25,
"cyclomatic": 2,
"n_automation": 5,
"n_rewrites": 11,
"n_structural": 0,
"automation_only": false,
... | 3 | import Clean.Utils.Field
import Clean.Utils.Bitwise
import Clean.Utils.Rotation
import Clean.Types.U64
variable {p : ℕ} [Fact p.Prime]
variable [p_large_enough: Fact (p > 2^16 + 2^8)]
namespace Gadgets.Rotation64.Theorems
open Utils.Rotation
/--
We define a bit rotation on "byte vectors" like u64 by splitting each b... | import Clean.Utils.Field
import Clean.Utils.Bitwise
import Clean.Utils.Rotation
import Clean.Types.U64
variable {p : ℕ} [Fact p.Prime]
variable [p_large_enough: Fact (p > 2^16 + 2^8)]
namespace Gadgets.Rotation64.Theorems
open Utils.Rotation
/--
We define a bit rotation on "byte vectors" like u64 by splitting each b... | @@ -39,13 +39,61 @@
nth_rw 1 [←Nat.pow_one 256]
repeat rw [Nat.add_mod, mul_mod256_off ho _ _ (by trivial), add_zero, Nat.mod_mod]
+lemma h_div {o : ℕ} (ho : o < 8) {x0 x1 x2 x3 x4 x5 x6 x7 : ℕ} :
+ (x0 + x1 * 256 + x2 * 256^2 + x3 * 256^3 + x4 * 256^4 + x5 * 256^5 + x6 * 256^6 + x7 * 256^7) / 2 ^ o
+ = x... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_15c3d596745b_0 | d16cfdf2624e0ec0 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Utils/Fin.lean | Fin | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 5 | 1 | [
{
"theorem_name": "foldl_factor_init",
"depth": 1,
"n_commands": 0,
"n_lines": 3,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hh := (foldl_factor_const f 1 init)\n simp_all only [mul_one, one_mul]",
"n_chars": 81,
"n_subproofs": 1,
... | [
{
"name": "foldl_factor_const",
"text": "/-- Factoring out a constant from a foldl sum -/\nlemma foldl_factor_const {α : Type*} [CommSemiring α] {n : ℕ} (f : Fin n → α) (c : α) (init : α) :\n Fin.foldl n (fun acc i => acc + f i * c) init =\n init + c * Fin.foldl n (fun acc i => acc + f i) 0 := by\n i... | [
{
"name": "foldl_factor_init",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 8,
"n_chars": 361,
"n_subproofs": 1,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,
"max_nesti... | 1 | import Mathlib.Data.ZMod.Basic
import Mathlib.Data.Fin.Basic
import Mathlib.Algebra.BigOperators.Fin
namespace Fin
/-! ## Lemmas about Fin.foldl and sums -/
/-- Factoring out the init from a foldl sum, corollary of foldl_factor_const -/
lemma foldl_factor_init {α : Type*} [CommSemiring α] {n : ℕ} (f : Fin n → α) (in... | import Mathlib.Data.ZMod.Basic
import Mathlib.Data.Fin.Basic
import Mathlib.Algebra.BigOperators.Fin
namespace Fin
/-! ## Lemmas about Fin.foldl and sums -/
/-- Factoring out a constant from a foldl sum -/
lemma foldl_factor_const {α : Type*} [CommSemiring α] {n : ℕ} (f : Fin n → α) (c : α) (init : α) :
Fin.fold... | @@ -6,10 +6,38 @@
/-! ## Lemmas about Fin.foldl and sums -/
+/-- Factoring out a constant from a foldl sum -/
+lemma foldl_factor_const {α : Type*} [CommSemiring α] {n : ℕ} (f : Fin n → α) (c : α) (init : α) :
+ Fin.foldl n (fun acc i => acc + f i * c) init =
+ init + c * Fin.foldl n (fun acc i => acc + f i)... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_15c3d596745b_1 | 3589c076b81907ce | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Utils/Fin.lean | Fin | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 5 | 1 | [
{
"theorem_name": "foldl_to_sum",
"depth": 1,
"n_commands": 0,
"n_lines": 4,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro n' f'\n simp only [Finset.sum_fin_eq_sum_range]\n exact foldl_eq_sum_range n' f'",
"n_chars": 92,
"n_subproofs... | [
{
"name": "foldl_eq_sum_range",
"text": "/-- Convert Fin.foldl to Finset.sum via range -/\nlemma foldl_eq_sum_range {α : Type*} [AddCommMonoid α] : ∀ (n' : ℕ) (f' : Fin n' → α),\n Fin.foldl n' (fun acc i => acc + f' i) 0 = ∑ i ∈ Finset.range n', if h : i < n' then f' ⟨i, h⟩ else 0 := by\n intro n' f'\n ... | [
{
"name": "foldl_to_sum",
"fan_in": 2,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 8,
"n_chars": 297,
"n_subproofs": 0,
"n_tactics": 4,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 2,
"automation_only": false,
"max_nesting": ... | 1 | import Mathlib.Data.ZMod.Basic
import Mathlib.Data.Fin.Basic
import Mathlib.Algebra.BigOperators.Fin
namespace Fin
/-! ## Lemmas about Fin.foldl and sums -/
/-- Convert Fin.foldl to a standard sum -/
lemma foldl_to_sum {α : Type*} [AddCommMonoid α] : ∀ (n' : ℕ) (f' : Fin n' → α),
Fin.foldl n' (fun acc i => acc +... | import Mathlib.Data.ZMod.Basic
import Mathlib.Data.Fin.Basic
import Mathlib.Algebra.BigOperators.Fin
namespace Fin
/-! ## Lemmas about Fin.foldl and sums -/
/-- Convert Fin.foldl to Finset.sum via range -/
lemma foldl_eq_sum_range {α : Type*} [AddCommMonoid α] : ∀ (n' : ℕ) (f' : Fin n' → α),
Fin.foldl n' (fun ac... | @@ -6,9 +6,37 @@
/-! ## Lemmas about Fin.foldl and sums -/
+/-- Convert Fin.foldl to Finset.sum via range -/
+lemma foldl_eq_sum_range {α : Type*} [AddCommMonoid α] : ∀ (n' : ℕ) (f' : Fin n' → α),
+ Fin.foldl n' (fun acc i => acc + f' i) 0 = ∑ i ∈ Finset.range n', if h : i < n' then f' ⟨i, h⟩ else 0 := by
+ in... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_15c3d596745b_2 | a59d5d79cf2bc01a | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Utils/Fin.lean | Fin | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 5 | 1 | [
{
"theorem_name": "foldl_to_sum_init_value",
"depth": 1,
"n_commands": 0,
"n_lines": 4,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro init n' f'\n rw [foldl_factor_init]\n simp only [foldl_to_sum]",
"n_chars": 74,
"n_subproofs": 0,
... | [
{
"name": "foldl_factor_init",
"text": "/-- Factoring out the init from a foldl sum, corollary of foldl_factor_const -/\nlemma foldl_factor_init {α : Type*} [CommSemiring α] {n : ℕ} (f : Fin n → α) (init : α) :\n Fin.foldl n (fun acc i => acc + f i) init =\n init + Fin.foldl n (fun acc i => acc + f i)... | [
{
"name": "foldl_to_sum_init_value",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 4,
"n_lines": 7,
"n_chars": 331,
"n_subproofs": 0,
"n_tactics": 4,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 1,
"automation_only": false,
"max... | 4 | import Mathlib.Data.ZMod.Basic
import Mathlib.Data.Fin.Basic
import Mathlib.Algebra.BigOperators.Fin
namespace Fin
/-! ## Lemmas about Fin.foldl and sums -/
/-- Factoring out a constant from a foldl sum -/
lemma foldl_factor_const {α : Type*} [CommSemiring α] {n : ℕ} (f : Fin n → α) (c : α) (init : α) :
Fin.fold... | import Mathlib.Data.ZMod.Basic
import Mathlib.Data.Fin.Basic
import Mathlib.Algebra.BigOperators.Fin
namespace Fin
/-! ## Lemmas about Fin.foldl and sums -/
/-- Factoring out a constant from a foldl sum -/
lemma foldl_factor_const {α : Type*} [CommSemiring α] {n : ℕ} (f : Fin n → α) (c : α) (init : α) :
Fin.fold... | @@ -32,6 +32,13 @@
congr 1
rw [mul_comm c (f (Fin.last m)), add_comm]
+/-- Factoring out the init from a foldl sum, corollary of foldl_factor_const -/
+lemma foldl_factor_init {α : Type*} [CommSemiring α] {n : ℕ} (f : Fin n → α) (init : α) :
+ Fin.foldl n (fun acc i => acc + f i) init =
+ init + Fin.f... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_15c3d596745b_3 | a69cc6a9702912b2 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Utils/Fin.lean | Fin | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 5 | 1 | [
{
"theorem_name": "foldl_to_sum",
"depth": 1,
"n_commands": 0,
"n_lines": 4,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro n' f'\n simp only [Finset.sum_fin_eq_sum_range]\n exact foldl_eq_sum_range n' f'",
"n_chars": 92,
"n_subproofs... | [
{
"name": "foldl_eq_sum_range",
"text": "/-- Convert Fin.foldl to Finset.sum via range -/\nlemma foldl_eq_sum_range {α : Type*} [AddCommMonoid α] : ∀ (n' : ℕ) (f' : Fin n' → α),\n Fin.foldl n' (fun acc i => acc + f' i) 0 = ∑ i ∈ Finset.range n', if h : i < n' then f' ⟨i, h⟩ else 0 := by\n intro n' f'\n ... | [
{
"name": "sum_interchange",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 2,
"n_lines": 14,
"n_chars": 609,
"n_subproofs": 0,
"n_tactics": 4,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 1,
"n_structural": 0,
"automation_only": false,
"max_nestin... | 2 | import Mathlib.Data.ZMod.Basic
import Mathlib.Data.Fin.Basic
import Mathlib.Algebra.BigOperators.Fin
namespace Fin
/-! ## Lemmas about Fin.foldl and sums -/
/-- Convert Fin.foldl to a standard sum -/
lemma foldl_to_sum {α : Type*} [AddCommMonoid α] : ∀ (n' : ℕ) (f' : Fin n' → α),
Fin.foldl n' (fun acc i => acc +... | import Mathlib.Data.ZMod.Basic
import Mathlib.Data.Fin.Basic
import Mathlib.Algebra.BigOperators.Fin
namespace Fin
/-! ## Lemmas about Fin.foldl and sums -/
/-- Convert Fin.foldl to Finset.sum via range -/
lemma foldl_eq_sum_range {α : Type*} [AddCommMonoid α] : ∀ (n' : ℕ) (f' : Fin n' → α),
Fin.foldl n' (fun ac... | @@ -6,9 +6,37 @@
/-! ## Lemmas about Fin.foldl and sums -/
+/-- Convert Fin.foldl to Finset.sum via range -/
+lemma foldl_eq_sum_range {α : Type*} [AddCommMonoid α] : ∀ (n' : ℕ) (f' : Fin n' → α),
+ Fin.foldl n' (fun acc i => acc + f' i) 0 = ∑ i ∈ Finset.range n', if h : i < n' then f' ⟨i, h⟩ else 0 := by
+ in... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_15c3d596745b_4 | df7e4490dc1a778c | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Utils/Fin.lean | Fin | 4 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 5 | 1 | [
{
"theorem_name": "foldl_to_sum_init_value",
"depth": 1,
"n_commands": 0,
"n_lines": 4,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro init n' f'\n rw [foldl_factor_init]\n simp only [foldl_to_sum]",
"n_chars": 74,
"n_subproofs": 0,
... | [
{
"name": "foldl_factor_init",
"text": "/-- Factoring out the init from a foldl sum, corollary of foldl_factor_const -/\nlemma foldl_factor_init {α : Type*} [CommSemiring α] {n : ℕ} (f : Fin n → α) (init : α) :\n Fin.foldl n (fun acc i => acc + f i) init =\n init + Fin.foldl n (fun acc i => acc + f i)... | [
{
"name": "foldl_split_mul_add_distrib",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 5,
"n_lines": 12,
"n_chars": 558,
"n_subproofs": 0,
"n_tactics": 5,
"cyclomatic": 1,
"n_automation": 4,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,
... | 5 | import Mathlib.Data.ZMod.Basic
import Mathlib.Data.Fin.Basic
import Mathlib.Algebra.BigOperators.Fin
namespace Fin
/-! ## Lemmas about Fin.foldl and sums -/
/-- Factoring out a constant from a foldl sum -/
lemma foldl_factor_const {α : Type*} [CommSemiring α] {n : ℕ} (f : Fin n → α) (c : α) (init : α) :
Fin.fold... | import Mathlib.Data.ZMod.Basic
import Mathlib.Data.Fin.Basic
import Mathlib.Algebra.BigOperators.Fin
namespace Fin
/-! ## Lemmas about Fin.foldl and sums -/
/-- Factoring out a constant from a foldl sum -/
lemma foldl_factor_const {α : Type*} [CommSemiring α] {n : ℕ} (f : Fin n → α) (c : α) (init : α) :
Fin.fold... | @@ -32,6 +32,13 @@
congr 1
rw [mul_comm c (f (Fin.last m)), add_comm]
+/-- Factoring out the init from a foldl sum, corollary of foldl_factor_const -/
+lemma foldl_factor_init {α : Type*} [CommSemiring α] {n : ℕ} (f : Fin n → α) (init : α) :
+ Fin.foldl n (fun acc i => acc + f i) init =
+ init + Fin.f... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_80ad5f962fb8_0 | ca51ef44fe549070 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Circuit/Formal.lean | Formal | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 1 | 3 | [
{
"theorem_name": "subcircuitChannelsWithGuarantees_subset_channelsWithGuarantees",
"depth": 1,
"n_commands": 0,
"n_lines": 3,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro input_var offset\n exact (circuit.channelsLawful input_var offset).1"... | [
{
"name": "channelsLawful",
"text": "theorem channelsLawful (self : FormalCircuitBase F Input Output) : ElaboratedCircuit.ChannelsLawful self.main\n self.channelsWithGuarantees :=\n self.elaborated.channelsLawful\n\n",
"fan_in": 3,
"n_lines": 5,
"n_chars": 179,
"n_subproofs": 0,
"n_t... | [
{
"name": "subcircuitChannelsWithGuarantees_subset_channelsWithGuarantees",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 9,
"n_chars": 351,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 2,... | 1 | import Clean.Circuit.Explicit
variable {F : Type} [FiniteField F] {α β : Type} {n : ℕ}
section
variable {Input Output : TypeMap}
open Lean Meta Elab Tactic in
elab "unfold_formal_circuit_consts" : tactic => do
withMainContext do
let noUnfold ← labelled `explicit_circuit_no_unfold
let unfoldTypes ← labelled... | import Clean.Circuit.Explicit
variable {F : Type} [FiniteField F] {α β : Type} {n : ℕ}
section
variable {Input Output : TypeMap}
open Lean Meta Elab Tactic in
elab "unfold_formal_circuit_consts" : tactic => do
withMainContext do
let noUnfold ← labelled `explicit_circuit_no_unfold
let unfoldTypes ← labelled... | @@ -104,6 +104,10 @@
channelsWithRequirements requirementsChannelsLawful).channelsWithRequirements =
channelsWithRequirements := rfl
+theorem channelsLawful (self : FormalCircuitBase F Input Output) : ElaboratedCircuit.ChannelsLawful self.main
+ self.channelsWithGuarantees :=
+ self.elaborated.channel... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_80ad5f962fb8_1 | 5f23b3eafd5cb08d | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Circuit/Formal.lean | Formal | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 1 | 3 | [
{
"theorem_name": "subcircuitChannelsWithGuarantees_subset_channelsWithGuarantees",
"depth": 1,
"n_commands": 0,
"n_lines": 3,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro input_var offset\n exact (circuit.channelsLawful input_var offset).1"... | [
{
"name": "channelsLawful",
"text": "theorem channelsLawful (self : FormalCircuitBase F Input Output) : ElaboratedCircuit.ChannelsLawful self.main\n self.channelsWithGuarantees :=\n self.elaborated.channelsLawful\n\n",
"fan_in": 3,
"n_lines": 5,
"n_chars": 179,
"n_subproofs": 0,
"n_t... | [
{
"name": "inChannelsOrGuarantees_channelsWithGuarantees",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 9,
"n_chars": 338,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 2,
"automation_... | 1 | import Clean.Circuit.Explicit
variable {F : Type} [FiniteField F] {α β : Type} {n : ℕ}
section
variable {Input Output : TypeMap}
open Lean Meta Elab Tactic in
elab "unfold_formal_circuit_consts" : tactic => do
withMainContext do
let noUnfold ← labelled `explicit_circuit_no_unfold
let unfoldTypes ← labelled... | import Clean.Circuit.Explicit
variable {F : Type} [FiniteField F] {α β : Type} {n : ℕ}
section
variable {Input Output : TypeMap}
open Lean Meta Elab Tactic in
elab "unfold_formal_circuit_consts" : tactic => do
withMainContext do
let noUnfold ← labelled `explicit_circuit_no_unfold
let unfoldTypes ← labelled... | @@ -104,6 +104,10 @@
channelsWithRequirements requirementsChannelsLawful).channelsWithRequirements =
channelsWithRequirements := rfl
+theorem channelsLawful (self : FormalCircuitBase F Input Output) : ElaboratedCircuit.ChannelsLawful self.main
+ self.channelsWithGuarantees :=
+ self.elaborated.channel... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_80ad5f962fb8_2 | 530118b099ad4c14 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Circuit/Formal.lean | Formal | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 1 | 3 | [
{
"theorem_name": "subcircuitChannelsWithGuarantees_subset_channelsWithGuarantees",
"depth": 1,
"n_commands": 0,
"n_lines": 3,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro input_var offset\n exact (circuit.channelsLawful input_var offset).1"... | [
{
"name": "channelsLawful",
"text": "theorem channelsLawful (self : FormalCircuitBase F Input Output) : ElaboratedCircuit.ChannelsLawful self.main\n self.channelsWithGuarantees :=\n self.elaborated.channelsLawful\n\n",
"fan_in": 3,
"n_lines": 5,
"n_chars": 179,
"n_subproofs": 0,
"n_t... | [
{
"name": "subcircuitChannelsLawful",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 5,
"n_chars": 236,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,
"ma... | 1 | import Clean.Circuit.Explicit
variable {F : Type} [FiniteField F] {α β : Type} {n : ℕ}
section
variable {Input Output : TypeMap}
open Lean Meta Elab Tactic in
elab "unfold_formal_circuit_consts" : tactic => do
withMainContext do
let noUnfold ← labelled `explicit_circuit_no_unfold
let unfoldTypes ← labelled... | import Clean.Circuit.Explicit
variable {F : Type} [FiniteField F] {α β : Type} {n : ℕ}
section
variable {Input Output : TypeMap}
open Lean Meta Elab Tactic in
elab "unfold_formal_circuit_consts" : tactic => do
withMainContext do
let noUnfold ← labelled `explicit_circuit_no_unfold
let unfoldTypes ← labelled... | @@ -104,6 +104,10 @@
channelsWithRequirements requirementsChannelsLawful).channelsWithRequirements =
channelsWithRequirements := rfl
+theorem channelsLawful (self : FormalCircuitBase F Input Output) : ElaboratedCircuit.ChannelsLawful self.main
+ self.channelsWithGuarantees :=
+ self.elaborated.channel... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_34c1755909b0_0 | 413ee46c0f6606ca | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Circuit/Basic.lean | Basic | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 1 | 1 | [
{
"theorem_name": "ProverEnvironment.extendsVector_ofFExprs",
"depth": 1,
"n_commands": 0,
"n_lines": 4,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rw [show Witgen.WitgenIR.ofFExprs (toElements xs) = Witgen.M.toIRLiteral (pure xs) from rfl,\n ... | [
{
"name": "ProverEnvironment.extendsVector_toIRLiteral",
"text": "/-- The completeness obligation of `witnessProgram`, stated at the level of provable\nvalues: the witnessed variable evaluates to the program's value. Tagged `↓ high` so it\nfires before `ExtendsVector` and the witness-IR evaluation unfold el... | [
{
"name": "ProverEnvironment.extendsVector_ofFExprs",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 14,
"n_chars": 846,
"n_subproofs": 0,
"n_tactics": 4,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 3,
"n_structural": 0,
"automation_only... | 1 | import Clean.Circuit.Operations
import Mathlib.Control.Monad.Writer
variable {F : Type} [FiniteField F] {α β : Type} {n : ℕ}
/--
The monad to write circuits. Lets you use `do` notation while in the background
it builds up a list of `Operation`s that represent the circuit at a low level.
Concretely, a `Circuit` is a ... | import Clean.Circuit.Operations
import Mathlib.Control.Monad.Writer
variable {F : Type} [FiniteField F] {α β : Type} {n : ℕ}
/--
The monad to write circuits. Lets you use `do` notation while in the background
it builds up a list of `Operation`s that represent the circuit at a low level.
Concretely, a `Circuit` is a ... | @@ -296,6 +296,21 @@
Circuit F (var F) :=
inst.witnessIR (value := value) program.toIRLiteral
+/-- The completeness obligation of `witnessProgram`, stated at the level of provable
+values: the witnessed variable evaluates to the program's value. Tagged `↓ high` so it
+fires before `ExtendsVector` and the witn... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_dfaa2de7acc8_0 | d35574932304e5b7 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/FlatComponent.lean | FlatComponent | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 11 | 9 | [
{
"theorem_name": "interactionsWith_eq",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [Operations.interactionsWith, interactions_eq]",
"n_chars": 62,
"n_subproofs": 0,
"n_tactics": 2,... | [
{
"name": "interactions_eq",
"text": "lemma interactions_eq : component.operations.interactions = component.rowOperations.interactions := by\n simp only [circuit_norm, rowOperations, witnessAny, GeneralFormalCircuit.instantiate, Component.operations,\n GeneralFormalCircuit.toSubcircuit, GeneralFormalCir... | [
{
"name": "interactionsWith_eq",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 5,
"n_chars": 220,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,
"max_nest... | 1 | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | @@ -66,8 +66,14 @@
variable {component : Component F} {env : Environment F}
+lemma interactions_eq : component.operations.interactions = component.rowOperations.interactions := by
+ simp only [circuit_norm, rowOperations, witnessAny, GeneralFormalCircuit.instantiate, Component.operations,
+ GeneralFormalCircui... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_dfaa2de7acc8_1 | 0b7c2bac2dd448c5 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/FlatComponent.lean | FlatComponent | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 11 | 9 | [
{
"theorem_name": "interactionsWith_eq",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [Operations.interactionsWith, interactions_eq]",
"n_chars": 62,
"n_subproofs": 0,
"n_tactics": 2,... | [
{
"name": "interactions_eq",
"text": "lemma interactions_eq : component.operations.interactions = component.rowOperations.interactions := by\n simp only [circuit_norm, rowOperations, witnessAny, GeneralFormalCircuit.instantiate, Component.operations,\n GeneralFormalCircuit.toSubcircuit, GeneralFormalCir... | [
{
"name": "interactionsValues_eq",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 4,
"n_chars": 188,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,
"max_ne... | 1 | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | @@ -66,8 +66,14 @@
variable {component : Component F} {env : Environment F}
-lemma interactionsValues_eq : component.operations.interactionValues env = component.rowOperations.interactionValues env := sorry
+lemma interactions_eq : component.operations.interactions = component.rowOperations.interactions := by
+ s... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_dfaa2de7acc8_2 | 072e3f97d418b7aa | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/FlatComponent.lean | FlatComponent | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 11 | 9 | [
{
"theorem_name": "interactionsWith_eq",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [Operations.interactionsWith, interactions_eq]",
"n_chars": 62,
"n_subproofs": 0,
"n_tactics": 2,... | [
{
"name": "interactions_eq",
"text": "lemma interactions_eq : component.operations.interactions = component.rowOperations.interactions := by\n simp only [circuit_norm, rowOperations, witnessAny, GeneralFormalCircuit.instantiate, Component.operations,\n GeneralFormalCircuit.toSubcircuit, GeneralFormalCir... | [
{
"name": "interactionsWith_of_exposedChannels",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 2,
"n_lines": 9,
"n_chars": 458,
"n_subproofs": 0,
"n_tactics": 4,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 0,
"automation_only": fal... | 2 | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | @@ -66,8 +66,14 @@
variable {component : Component F} {env : Environment F}
+lemma interactions_eq : component.operations.interactions = component.rowOperations.interactions := by
+ simp only [circuit_norm, rowOperations, witnessAny, GeneralFormalCircuit.instantiate, Component.operations,
+ GeneralFormalCircui... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_dfaa2de7acc8_3 | b4e7b623ec346f40 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/FlatComponent.lean | FlatComponent | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 11 | 1 | [
{
"theorem_name": "constraintsHold_iff",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [circuit_norm, lookups_eq, constraints_eq]",
"n_chars": 58,
"n_subproofs": 0,
"n_tactics": 2,
... | [
{
"name": "constraints_eq",
"text": "lemma constraints_eq : component.operations.constraints = component.rowOperations.constraints := by\n simp only [circuit_norm, rowOperations, witnessAny, GeneralFormalCircuit.instantiate, Component.operations,\n GeneralFormalCircuit.toSubcircuit, GeneralFormalCircuit... | [
{
"name": "constraintsHold_iff",
"fan_in": 3,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 5,
"n_chars": 205,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,
"max_nest... | 2 | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | @@ -66,13 +66,19 @@
variable {component : Component F} {env : Environment F}
+lemma constraints_eq : component.operations.constraints = component.rowOperations.constraints := by
+ simp only [circuit_norm, rowOperations, witnessAny, GeneralFormalCircuit.instantiate, Component.operations,
+ GeneralFormalCircuit.... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_dfaa2de7acc8_4 | 91f61d4449694fad | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/FlatComponent.lean | FlatComponent | 4 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 11 | 9 | [
{
"theorem_name": "interactionsWith_eq",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [Operations.interactionsWith, interactions_eq]",
"n_chars": 62,
"n_subproofs": 0,
"n_tactics": 2,... | [
{
"name": "interactions_eq",
"text": "lemma interactions_eq : component.operations.interactions = component.rowOperations.interactions := by\n simp only [circuit_norm, rowOperations, witnessAny, GeneralFormalCircuit.instantiate, Component.operations,\n GeneralFormalCircuit.toSubcircuit, GeneralFormalCir... | [
{
"name": "guarantees_iff",
"fan_in": 3,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 5,
"n_chars": 187,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,
"max_nesting":... | 1 | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | @@ -66,8 +66,14 @@
variable {component : Component F} {env : Environment F}
+lemma interactions_eq : component.operations.interactions = component.rowOperations.interactions := by
+ simp only [circuit_norm, rowOperations, witnessAny, GeneralFormalCircuit.instantiate, Component.operations,
+ GeneralFormalCircui... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_dfaa2de7acc8_5 | 575f64b75a777787 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/FlatComponent.lean | FlatComponent | 5 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 11 | 9 | [
{
"theorem_name": "interactionsWith_eq",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [Operations.interactionsWith, interactions_eq]",
"n_chars": 62,
"n_subproofs": 0,
"n_tactics": 2,... | [
{
"name": "interactions_eq",
"text": "lemma interactions_eq : component.operations.interactions = component.rowOperations.interactions := by\n simp only [circuit_norm, rowOperations, witnessAny, GeneralFormalCircuit.instantiate, Component.operations,\n GeneralFormalCircuit.toSubcircuit, GeneralFormalCir... | [
{
"name": "requirements_iff",
"fan_in": 2,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 5,
"n_chars": 193,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,
"max_nesting... | 1 | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | @@ -66,8 +66,14 @@
variable {component : Component F} {env : Environment F}
+lemma interactions_eq : component.operations.interactions = component.rowOperations.interactions := by
+ simp only [circuit_norm, rowOperations, witnessAny, GeneralFormalCircuit.instantiate, Component.operations,
+ GeneralFormalCircui... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_dfaa2de7acc8_6 | d914fba7bfd30c5c | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/FlatComponent.lean | FlatComponent | 6 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 11 | 9 | [
{
"theorem_name": "interactionsWith_eq",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [Operations.interactionsWith, interactions_eq]",
"n_chars": 62,
"n_subproofs": 0,
"n_tactics": 2,... | [
{
"name": "interactions_eq",
"text": "lemma interactions_eq : component.operations.interactions = component.rowOperations.interactions := by\n simp only [circuit_norm, rowOperations, witnessAny, GeneralFormalCircuit.instantiate, Component.operations,\n GeneralFormalCircuit.toSubcircuit, GeneralFormalCir... | [
{
"name": "channelGuarantees_iff",
"fan_in": 2,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 5,
"n_chars": 241,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,
"max_ne... | 1 | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | @@ -66,8 +66,14 @@
variable {component : Component F} {env : Environment F}
+lemma interactions_eq : component.operations.interactions = component.rowOperations.interactions := by
+ simp only [circuit_norm, rowOperations, witnessAny, GeneralFormalCircuit.instantiate, Component.operations,
+ GeneralFormalCircui... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_dfaa2de7acc8_7 | e0d0b41cdb980193 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/FlatComponent.lean | FlatComponent | 7 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 11 | 9 | [
{
"theorem_name": "interactionsWith_eq",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [Operations.interactionsWith, interactions_eq]",
"n_chars": 62,
"n_subproofs": 0,
"n_tactics": 2,... | [
{
"name": "interactions_eq",
"text": "lemma interactions_eq : component.operations.interactions = component.rowOperations.interactions := by\n simp only [circuit_norm, rowOperations, witnessAny, GeneralFormalCircuit.instantiate, Component.operations,\n GeneralFormalCircuit.toSubcircuit, GeneralFormalCir... | [
{
"name": "channelRequirements_iff",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 5,
"n_chars": 247,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,
"max_... | 1 | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | @@ -66,8 +66,14 @@
variable {component : Component F} {env : Environment F}
+lemma interactions_eq : component.operations.interactions = component.rowOperations.interactions := by
+ simp only [circuit_norm, rowOperations, witnessAny, GeneralFormalCircuit.instantiate, Component.operations,
+ GeneralFormalCircui... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_dfaa2de7acc8_8 | 5017c2f18a273206 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/FlatComponent.lean | FlatComponent | 8 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 11 | 9 | [
{
"theorem_name": "interactionsWith_eq",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [Operations.interactionsWith, interactions_eq]",
"n_chars": 62,
"n_subproofs": 0,
"n_tactics": 2,... | [
{
"name": "interactions_eq",
"text": "lemma interactions_eq : component.operations.interactions = component.rowOperations.interactions := by\n simp only [circuit_norm, rowOperations, witnessAny, GeneralFormalCircuit.instantiate, Component.operations,\n GeneralFormalCircuit.toSubcircuit, GeneralFormalCir... | [
{
"name": "inChannelsOrRequirements_of_constraints",
"fan_in": 2,
"n_deps_direct": 2,
"n_deps_transitive": 4,
"n_lines": 9,
"n_chars": 408,
"n_subproofs": 0,
"n_tactics": 5,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 2,
"automation_only":... | 4 | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | @@ -76,13 +76,22 @@
GeneralFormalCircuit.toSubcircuit, GeneralFormalCircuit.toWithHint,
GeneralFormalCircuit.WithHint.toSubcircuit, Operations.toNested_toFlat]
+lemma interactions_eq : component.operations.interactions = component.rowOperations.interactions := by
+ simp only [circuit_norm, rowOperations, w... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_dfaa2de7acc8_9 | 5e1917b2aa061b58 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/FlatComponent.lean | FlatComponent | 9 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 11 | 9 | [
{
"theorem_name": "interactionsWith_eq",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [Operations.interactionsWith, interactions_eq]",
"n_chars": 62,
"n_subproofs": 0,
"n_tactics": 2,... | [
{
"name": "interactions_eq",
"text": "lemma interactions_eq : component.operations.interactions = component.rowOperations.interactions := by\n simp only [circuit_norm, rowOperations, witnessAny, GeneralFormalCircuit.instantiate, Component.operations,\n GeneralFormalCircuit.toSubcircuit, GeneralFormalCir... | [
{
"name": "inChannelsOrGuarantees",
"fan_in": 2,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 8,
"n_chars": 361,
"n_subproofs": 1,
"n_tactics": 4,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,
"max_... | 1 | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | @@ -66,8 +66,16 @@
variable {component : Component F} {env : Environment F}
+lemma interactions_eq : component.operations.interactions = component.rowOperations.interactions := by
+ simp only [circuit_norm, rowOperations, witnessAny, GeneralFormalCircuit.instantiate, Component.operations,
+ GeneralFormalCircui... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_dfaa2de7acc8_10 | e3bf73bb5dc74f76 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/FlatComponent.lean | FlatComponent | 10 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 11 | 9 | [
{
"theorem_name": "interactionsWith_eq",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [Operations.interactionsWith, interactions_eq]",
"n_chars": 62,
"n_subproofs": 0,
"n_tactics": 2,... | [
{
"name": "interactions_eq",
"text": "lemma interactions_eq : component.operations.interactions = component.rowOperations.interactions := by\n simp only [circuit_norm, rowOperations, witnessAny, GeneralFormalCircuit.instantiate, Component.operations,\n GeneralFormalCircuit.toSubcircuit, GeneralFormalCir... | [
{
"name": "weakSoundness",
"fan_in": 2,
"n_deps_direct": 3,
"n_deps_transitive": 6,
"n_lines": 14,
"n_chars": 912,
"n_subproofs": 1,
"n_tactics": 9,
"cyclomatic": 1,
"n_automation": 3,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": false,
"max_nesting"... | 6 | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | @@ -76,15 +76,22 @@
GeneralFormalCircuit.toSubcircuit, GeneralFormalCircuit.toWithHint,
GeneralFormalCircuit.WithHint.toSubcircuit, Operations.toNested_toFlat]
+lemma interactions_eq : component.operations.interactions = component.rowOperations.interactions := by
+ simp only [circuit_norm, rowOperations, w... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_dfaa2de7acc8_11 | c8897555c382fedc | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/FlatComponent.lean | FlatComponent | 11 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 11 | 9 | [
{
"theorem_name": "interactionsWith_eq",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [Operations.interactionsWith, interactions_eq]",
"n_chars": 62,
"n_subproofs": 0,
"n_tactics": 2,... | [
{
"name": "interactions_eq",
"text": "lemma interactions_eq : component.operations.interactions = component.rowOperations.interactions := by\n simp only [circuit_norm, rowOperations, witnessAny, GeneralFormalCircuit.instantiate, Component.operations,\n GeneralFormalCircuit.toSubcircuit, GeneralFormalCir... | [
{
"name": "interactionsWith_nil_of_channel_not_mem",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 15,
"n_chars": 682,
"n_subproofs": 1,
"n_tactics": 13,
"cyclomatic": 1,
"n_automation": 3,
"n_rewrites": 1,
"n_structural": 3,
"automation_only... | 2 | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | @@ -66,6 +66,11 @@
variable {component : Component F} {env : Environment F}
+lemma interactions_eq : component.operations.interactions = component.rowOperations.interactions := by
+ simp only [circuit_norm, rowOperations, witnessAny, GeneralFormalCircuit.instantiate, Component.operations,
+ GeneralFormalCircui... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_dfaa2de7acc8_12 | da05b117ddda7853 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/FlatComponent.lean | FlatComponent | 12 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 11 | 3 | [
{
"theorem_name": "interactionsWith_nil_of_channel_not_mem",
"depth": 1,
"n_commands": 0,
"n_lines": 12,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n contrapose!\n simp only [AbstractInteraction.eval_channel, interactionsWith_eq_filter, ne_eq, Lis... | [
{
"name": "forall_interactions_iff",
"text": "lemma forall_interactions_iff (table : Table F) (motive : Interaction F → Prop) :\n (∀ i ∈ table.interactions, motive i) ↔\n ∀ row ∈ table.table, ∀ i ∈ table.component.operations.interactions,\n motive (i.eval (table.environment row)) := by\n simp on... | [
{
"name": "guarantees_iff_forall",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 7,
"n_chars": 214,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,
"max_ne... | 1 | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | @@ -148,9 +148,25 @@
table.table.map fun row =>
table.component.operations.interactionValuesWith channel (table.environment row)
+lemma forall_interactions_iff (table : Table F) (motive : Interaction F → Prop) :
+ (∀ i ∈ table.interactions, motive i) ↔
+ ∀ row ∈ table.table, ∀ i ∈ table.component.operat... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_dfaa2de7acc8_13 | 4e3a24b877a46ad1 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/FlatComponent.lean | FlatComponent | 13 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 11 | 2 | [
{
"theorem_name": "channelGuarantees_iff_forall",
"depth": 1,
"n_commands": 0,
"n_lines": 3,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [Table.ChannelGuarantees, circuit_norm, forall_interactionsWith_iff]\n rfl",
"n_chars": 90,
... | [
{
"name": "forall_interactionsWith_iff",
"text": "lemma forall_interactionsWith_iff (table : Table F) (channel : RawChannel F)\n (motive : Interaction F → Prop) :\n (∀ i ∈ table.interactionsWith channel, motive i) ↔\n ∀ row ∈ table.table, ∀ i ∈ table.component.operations.interactions,\n (i.chann... | [
{
"name": "channelGuarantees_iff_forall",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 7,
"n_chars": 284,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,
... | 1 | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | @@ -148,9 +148,26 @@
table.table.map fun row =>
table.component.operations.interactionValuesWith channel (table.environment row)
+lemma forall_interactionsWith_iff (table : Table F) (channel : RawChannel F)
+ (motive : Interaction F → Prop) :
+ (∀ i ∈ table.interactionsWith channel, motive i) ↔
+ ∀ row... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_dfaa2de7acc8_14 | 29c6a5dbe2de746e | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/FlatComponent.lean | FlatComponent | 14 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 11 | 9 | [
{
"theorem_name": "interactionsWith_eq",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [Operations.interactionsWith, interactions_eq]",
"n_chars": 62,
"n_subproofs": 0,
"n_tactics": 2,... | [
{
"name": "interactions_eq",
"text": "lemma interactions_eq : component.operations.interactions = component.rowOperations.interactions := by\n simp only [circuit_norm, rowOperations, witnessAny, GeneralFormalCircuit.instantiate, Component.operations,\n GeneralFormalCircuit.toSubcircuit, GeneralFormalCir... | [
{
"name": "guarantees_iff_channelGuarantees",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 3,
"n_lines": 9,
"n_chars": 427,
"n_subproofs": 0,
"n_tactics": 6,
"cyclomatic": 3,
"n_automation": 4,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": false,... | 3 | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | @@ -66,11 +66,18 @@
variable {component : Component F} {env : Environment F}
+lemma interactions_eq : component.operations.interactions = component.rowOperations.interactions := by
+ simp only [circuit_norm, rowOperations, witnessAny, GeneralFormalCircuit.instantiate, Component.operations,
+ GeneralFormalCircu... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_dfaa2de7acc8_15 | b113cfeda8cede3b | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/FlatComponent.lean | FlatComponent | 15 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 11 | 3 | [
{
"theorem_name": "interactionsWith_nil_of_channel_not_mem",
"depth": 1,
"n_commands": 0,
"n_lines": 12,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n contrapose!\n simp only [AbstractInteraction.eval_channel, interactionsWith_eq_filter, ne_eq, Lis... | [
{
"name": "forall_interactions_iff",
"text": "lemma forall_interactions_iff (table : Table F) (motive : Interaction F → Prop) :\n (∀ i ∈ table.interactions, motive i) ↔\n ∀ row ∈ table.table, ∀ i ∈ table.component.operations.interactions,\n motive (i.eval (table.environment row)) := by\n simp on... | [
{
"name": "requirements_iff_forall",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 7,
"n_chars": 222,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,
"max_... | 1 | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | @@ -148,9 +148,25 @@
table.table.map fun row =>
table.component.operations.interactionValuesWith channel (table.environment row)
+lemma forall_interactions_iff (table : Table F) (motive : Interaction F → Prop) :
+ (∀ i ∈ table.interactions, motive i) ↔
+ ∀ row ∈ table.table, ∀ i ∈ table.component.operat... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_dfaa2de7acc8_16 | 921f4fe81d513608 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/FlatComponent.lean | FlatComponent | 16 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 11 | 2 | [
{
"theorem_name": "channelGuarantees_iff_forall",
"depth": 1,
"n_commands": 0,
"n_lines": 3,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [Table.ChannelGuarantees, circuit_norm, forall_interactionsWith_iff]\n rfl",
"n_chars": 90,
... | [
{
"name": "forall_interactionsWith_iff",
"text": "lemma forall_interactionsWith_iff (table : Table F) (channel : RawChannel F)\n (motive : Interaction F → Prop) :\n (∀ i ∈ table.interactionsWith channel, motive i) ↔\n ∀ row ∈ table.table, ∀ i ∈ table.component.operations.interactions,\n (i.chann... | [
{
"name": "channelRequirements_iff_forall",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 7,
"n_chars": 292,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,
... | 1 | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | @@ -148,9 +148,26 @@
table.table.map fun row =>
table.component.operations.interactionValuesWith channel (table.environment row)
+lemma forall_interactionsWith_iff (table : Table F) (channel : RawChannel F)
+ (motive : Interaction F → Prop) :
+ (∀ i ∈ table.interactionsWith channel, motive i) ↔
+ ∀ row... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_dfaa2de7acc8_17 | c6000672a2f17c52 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/FlatComponent.lean | FlatComponent | 17 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 11 | 9 | [
{
"theorem_name": "interactionsWith_eq",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [Operations.interactionsWith, interactions_eq]",
"n_chars": 62,
"n_subproofs": 0,
"n_tactics": 2,... | [
{
"name": "interactions_eq",
"text": "lemma interactions_eq : component.operations.interactions = component.rowOperations.interactions := by\n simp only [circuit_norm, rowOperations, witnessAny, GeneralFormalCircuit.instantiate, Component.operations,\n GeneralFormalCircuit.toSubcircuit, GeneralFormalCir... | [
{
"name": "requirements_iff_channelRequirements_of_constraints",
"fan_in": 0,
"n_deps_direct": 3,
"n_deps_transitive": 6,
"n_lines": 19,
"n_chars": 939,
"n_subproofs": 0,
"n_tactics": 14,
"cyclomatic": 2,
"n_automation": 2,
"n_rewrites": 2,
"n_structural": 8,
"aut... | 6 | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | @@ -76,15 +76,22 @@
GeneralFormalCircuit.toSubcircuit, GeneralFormalCircuit.toWithHint,
GeneralFormalCircuit.WithHint.toSubcircuit, Operations.toNested_toFlat]
+lemma interactions_eq : component.operations.interactions = component.rowOperations.interactions := by
+ simp only [circuit_norm, rowOperations, w... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_dfaa2de7acc8_18 | 322c7e57f2af2389 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/FlatComponent.lean | FlatComponent | 18 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 11 | 9 | [
{
"theorem_name": "interactionsWith_eq",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [Operations.interactionsWith, interactions_eq]",
"n_chars": 62,
"n_subproofs": 0,
"n_tactics": 2,... | [
{
"name": "interactions_eq",
"text": "lemma interactions_eq : component.operations.interactions = component.rowOperations.interactions := by\n simp only [circuit_norm, rowOperations, witnessAny, GeneralFormalCircuit.instantiate, Component.operations,\n GeneralFormalCircuit.toSubcircuit, GeneralFormalCir... | [
{
"name": "requirements_of_not_mem_of_constraints",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 5,
"n_lines": 13,
"n_chars": 542,
"n_subproofs": 1,
"n_tactics": 9,
"cyclomatic": 1,
"n_automation": 3,
"n_rewrites": 0,
"n_structural": 4,
"automation_only":... | 4 | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | @@ -76,13 +76,22 @@
GeneralFormalCircuit.toSubcircuit, GeneralFormalCircuit.toWithHint,
GeneralFormalCircuit.WithHint.toSubcircuit, Operations.toNested_toFlat]
+lemma interactions_eq : component.operations.interactions = component.rowOperations.interactions := by
+ simp only [circuit_norm, rowOperations, w... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_dfaa2de7acc8_19 | 5b1a955cd64544fd | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/FlatComponent.lean | FlatComponent | 19 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 11 | 9 | [
{
"theorem_name": "interactionsWith_eq",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [Operations.interactionsWith, interactions_eq]",
"n_chars": 62,
"n_subproofs": 0,
"n_tactics": 2,... | [
{
"name": "interactions_eq",
"text": "lemma interactions_eq : component.operations.interactions = component.rowOperations.interactions := by\n simp only [circuit_norm, rowOperations, witnessAny, GeneralFormalCircuit.instantiate, Component.operations,\n GeneralFormalCircuit.toSubcircuit, GeneralFormalCir... | [
{
"name": "guarantees_of_not_mem",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 2,
"n_lines": 12,
"n_chars": 444,
"n_subproofs": 1,
"n_tactics": 9,
"cyclomatic": 1,
"n_automation": 3,
"n_rewrites": 0,
"n_structural": 4,
"automation_only": false,
"max_... | 1 | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | @@ -66,8 +66,16 @@
variable {component : Component F} {env : Environment F}
+lemma interactions_eq : component.operations.interactions = component.rowOperations.interactions := by
+ simp only [circuit_norm, rowOperations, witnessAny, GeneralFormalCircuit.instantiate, Component.operations,
+ GeneralFormalCircui... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_dfaa2de7acc8_20 | 1c7bdfa6a8730333 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/FlatComponent.lean | FlatComponent | 20 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 11 | 9 | [
{
"theorem_name": "interactionsWith_eq",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [Operations.interactionsWith, interactions_eq]",
"n_chars": 62,
"n_subproofs": 0,
"n_tactics": 2,... | [
{
"name": "interactions_eq",
"text": "lemma interactions_eq : component.operations.interactions = component.rowOperations.interactions := by\n simp only [circuit_norm, rowOperations, witnessAny, GeneralFormalCircuit.instantiate, Component.operations,\n GeneralFormalCircuit.toSubcircuit, GeneralFormalCir... | [
{
"name": "requirements_of_partial_guarantees_of_constraints",
"fan_in": 0,
"n_deps_direct": 3,
"n_deps_transitive": 8,
"n_lines": 35,
"n_chars": 1672,
"n_subproofs": 2,
"n_tactics": 20,
"cyclomatic": 2,
"n_automation": 4,
"n_rewrites": 3,
"n_structural": 7,
"auto... | 7 | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | import Clean.Air.Circuit
namespace Air.Flat
variable {F : Type} [FiniteField F]
variable {Input Output : TypeMap} [ProvableType Input] [ProvableType Output]
/--
A flat AIR component: one circuit whose constraints are checked independently on each row.
There are no direct adjacent-row constraints; communication with o... | @@ -76,18 +76,26 @@
GeneralFormalCircuit.toSubcircuit, GeneralFormalCircuit.toWithHint,
GeneralFormalCircuit.WithHint.toSubcircuit, Operations.toNested_toFlat]
+lemma interactions_eq : component.operations.interactions = component.rowOperations.interactions := by
+ simp only [circuit_norm, rowOperations, w... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_49b3a71bbd74_0 | f7b654f4a40a8d45 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Gadgets/Keccak/ThetaC.lean | ThetaC | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 1 | 1 | [
{
"theorem_name": "soundness",
"depth": 1,
"n_commands": 0,
"n_lines": 17,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n circuit_proof_start [Xor64.circuit, Xor64.Assumptions, Xor64.Spec]\n\n -- rewrite goal\n apply KeccakRow.normalized_value_ext\... | [
{
"name": "thetaC_loop",
"text": "lemma thetaC_loop (state : Vector ℕ 25) :\n Specs.Keccak256.thetaC state = .mapFinRange 5 fun i =>\n state[5*i.val] ^^^ state[5*i.val + 1] ^^^ state[5*i.val + 2] ^^^ state[5*i.val + 3] ^^^ state[5*i.val + 4] := by\n rw [Specs.Keccak256.thetaC, Vector.mapFinRange, V... | [
{
"name": "soundness",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 19,
"n_chars": 631,
"n_subproofs": 1,
"n_tactics": 12,
"cyclomatic": 1,
"n_automation": 5,
"n_rewrites": 0,
"n_structural": 3,
"automation_only": false,
"max_nesting": 4... | 1 | import Clean.Circuit.Loops
import Clean.Gadgets.Addition8.Addition8FullCarry
import Clean.Types.U64
import Clean.Gadgets.Addition32.Theorems
import Clean.Gadgets.Xor.Xor64
import Clean.Gadgets.Keccak.KeccakState
import Clean.Specs.Keccak256
namespace Gadgets.Keccak256.ThetaC
variable {p : ℕ} [Fact p.Prime] [Fact (p > ... | import Clean.Circuit.Loops
import Clean.Gadgets.Addition8.Addition8FullCarry
import Clean.Types.U64
import Clean.Gadgets.Addition32.Theorems
import Clean.Gadgets.Xor.Xor64
import Clean.Gadgets.Keccak.KeccakState
import Clean.Specs.Keccak256
namespace Gadgets.Keccak256.ThetaC
variable {p : ℕ} [Fact p.Prime] [Fact (p > ... | @@ -28,8 +28,30 @@
elaborate_circuit
-- rewrite thetaC as a loop
-theorem soundness : Soundness (F p) main Assumptions Spec := sorry
+lemma thetaC_loop (state : Vector ℕ 25) :
+ Specs.Keccak256.thetaC state = .mapFinRange 5 fun i =>
+ state[5*i.val] ^^^ state[5*i.val + 1] ^^^ state[5*i.val + 2] ^^^ state[... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_6378c25ddd81_0 | 6190da8d9949228c | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/OrderedChannel.lean | OrderedChannel | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 13 | 3 | [
{
"theorem_name": "orderedChannel_append",
"depth": 1,
"n_commands": 0,
"n_lines": 16,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [orderedChannel_iff]\n constructor\n · rintro ⟨ordered_refl, ordered_split⟩\n simp_all\n construct... | [
{
"name": "orderedChannel_iff",
"text": "/-- Alternative, and sometimes more convenient, formulation of `OrderedChannel` -/\nlemma orderedChannel_iff (tables : List (Component F)) (channel : RawChannel F) :\n OrderedChannel channel tables ↔\n (∀ t ∈ tables, OrderedChannelRefl channel t) ∧\n ∀ ts ss, ... | [
{
"name": "orderedChannel_append",
"fan_in": 0,
"n_deps_direct": 3,
"n_deps_transitive": 3,
"n_lines": 22,
"n_chars": 789,
"n_subproofs": 2,
"n_tactics": 16,
"cyclomatic": 4,
"n_automation": 8,
"n_rewrites": 2,
"n_structural": 5,
"automation_only": false,
"max... | 1 | import Clean.Air.FlatEnsemble
variable {F : Type} [FiniteField F]
open Air.Flat (Component Table Tables)
-- TODO deduplicate and add to Basic
attribute [circuit_norm] forall_eq_or_imp List.mem_flatMap List.mem_map exists_exists_and_eq_and
not_exists not_and List.Subset.refl List.subset_append_of_subset_left List.su... | import Clean.Air.FlatEnsemble
variable {F : Type} [FiniteField F]
open Air.Flat (Component Table Tables)
-- TODO deduplicate and add to Basic
attribute [circuit_norm] forall_eq_or_imp List.mem_flatMap List.mem_map exists_exists_and_eq_and
not_exists not_and List.Subset.refl List.subset_append_of_subset_left List.su... | @@ -79,16 +79,83 @@
simp only [exists_imp]
tauto
+/-- Alternative, and sometimes more convenient, formulation of `OrderedChannel` -/
+lemma orderedChannel_iff (tables : List (Component F)) (channel : RawChannel F) :
+ OrderedChannel channel tables ↔
+ (∀ t ∈ tables, OrderedChannelRefl channel t) ∧
+ ∀ ts... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_6378c25ddd81_1 | 292f7b74ede0cd33 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/OrderedChannel.lean | OrderedChannel | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 13 | 3 | [
{
"theorem_name": "orderedChannel_append",
"depth": 1,
"n_commands": 0,
"n_lines": 16,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [orderedChannel_iff]\n constructor\n · rintro ⟨ordered_refl, ordered_split⟩\n simp_all\n construct... | [
{
"name": "orderedChannel_iff",
"text": "/-- Alternative, and sometimes more convenient, formulation of `OrderedChannel` -/\nlemma orderedChannel_iff (tables : List (Component F)) (channel : RawChannel F) :\n OrderedChannel channel tables ↔\n (∀ t ∈ tables, OrderedChannelRefl channel t) ∧\n ∀ ts ss, ... | [
{
"name": "orderedChannel_of_no_requirements",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 9,
"n_chars": 398,
"n_subproofs": 0,
"n_tactics": 4,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 1,
"automation_only": false... | 1 | import Clean.Air.FlatEnsemble
variable {F : Type} [FiniteField F]
open Air.Flat (Component Table Tables)
-- TODO deduplicate and add to Basic
attribute [circuit_norm] forall_eq_or_imp List.mem_flatMap List.mem_map exists_exists_and_eq_and
not_exists not_and List.Subset.refl List.subset_append_of_subset_left List.su... | import Clean.Air.FlatEnsemble
variable {F : Type} [FiniteField F]
open Air.Flat (Component Table Tables)
-- TODO deduplicate and add to Basic
attribute [circuit_norm] forall_eq_or_imp List.mem_flatMap List.mem_map exists_exists_and_eq_and
not_exists not_and List.Subset.refl List.subset_append_of_subset_left List.su... | @@ -79,21 +79,91 @@
simp only [exists_imp]
tauto
+/-- Alternative, and sometimes more convenient, formulation of `OrderedChannel` -/
+lemma orderedChannel_iff (tables : List (Component F)) (channel : RawChannel F) :
+ OrderedChannel channel tables ↔
+ (∀ t ∈ tables, OrderedChannelRefl channel t) ∧
+ ∀ ts... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_6378c25ddd81_2 | a07ad5c699c3c441 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/OrderedChannel.lean | OrderedChannel | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 13 | 2 | [
{
"theorem_name": "partialBalancedChannel_of_cons_of_orderedChannel",
"depth": 1,
"n_commands": 0,
"n_lines": 4,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro table_constraints partial_balance ordered_channel\n apply partialBalancedChannel_of... | [
{
"name": "partialBalancedChannel_of_cons_of_orderedChannelLt",
"text": "/--\nFor ordered channels, we can always instantiate partial balance at an initial sublist.\n-/\ntheorem partialBalancedChannel_of_cons_of_orderedChannelLt [DecidableEq F]\n {table : Table F} {tables : Tables F} (same_data : table.dat... | [
{
"name": "partialBalancedChannel_of_cons_of_orderedChannel",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 15,
"n_chars": 668,
"n_subproofs": 0,
"n_tactics": 4,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 2,
"automat... | 1 | import Clean.Air.FlatEnsemble
variable {F : Type} [FiniteField F]
open Air.Flat (Component Table Tables)
-- TODO deduplicate and add to Basic
attribute [circuit_norm] forall_eq_or_imp List.mem_flatMap List.mem_map exists_exists_and_eq_and
not_exists not_and List.Subset.refl List.subset_append_of_subset_left List.su... | import Clean.Air.FlatEnsemble
variable {F : Type} [FiniteField F]
open Air.Flat (Component Table Tables)
-- TODO deduplicate and add to Basic
attribute [circuit_norm] forall_eq_or_imp List.mem_flatMap List.mem_map exists_exists_and_eq_and
not_exists not_and List.Subset.refl List.subset_append_of_subset_left List.su... | @@ -180,13 +180,48 @@
/--
For ordered channels, we can always instantiate partial balance at an initial sublist.
-/
+theorem partialBalancedChannel_of_cons_of_orderedChannelLt [DecidableEq F]
+ {table : Table F} {tables : Tables F} (same_data : table.data = tables.data)
+ {channel : RawChannel F} :
+ table.Constr... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_6378c25ddd81_3 | 98eaff85c62603db | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/OrderedChannel.lean | OrderedChannel | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 13 | 2 | [
{
"theorem_name": "guarantees_of_requirements_append",
"depth": 1,
"n_commands": 0,
"n_lines": 22,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n -- we show that for each (t, ss) pair, the assumptions of `*_cons` hold\n rintro constraints reqs parti... | [
{
"name": "guarantees_of_requirements_cons",
"text": "/--\nThe significance of `OrderedChannel` is that it lets us prove soundness\non a list of tables by induction. This lemma captures the main step.\n-/\nlemma guarantees_of_requirements_cons [DecidableEq F]\n -- given a list of tables, and one additional... | [
{
"name": "guarantees_of_requirements_append",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 42,
"n_chars": 1995,
"n_subproofs": 2,
"n_tactics": 22,
"cyclomatic": 4,
"n_automation": 1,
"n_rewrites": 2,
"n_structural": 13,
"automation_only": f... | 2 | import Clean.Air.FlatEnsemble
variable {F : Type} [FiniteField F]
open Air.Flat (Component Table Tables)
-- TODO deduplicate and add to Basic
attribute [circuit_norm] forall_eq_or_imp List.mem_flatMap List.mem_map exists_exists_and_eq_and
not_exists not_and List.Subset.refl List.subset_append_of_subset_left List.su... | import Clean.Air.FlatEnsemble
variable {F : Type} [FiniteField F]
open Air.Flat (Component Table Tables)
-- TODO deduplicate and add to Basic
attribute [circuit_norm] forall_eq_or_imp List.mem_flatMap List.mem_map exists_exists_and_eq_and
not_exists not_and List.Subset.refl List.subset_append_of_subset_left List.su... | @@ -210,6 +210,65 @@
exact ⟨ channel_reqs, extra_reqs ⟩
/--
+The significance of `OrderedChannel` is that it lets us prove soundness
+on a list of tables by induction. This lemma captures the main step.
+-/
+lemma guarantees_of_requirements_cons [DecidableEq F]
+ -- given a list of tables, and one additional t... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_6378c25ddd81_4 | cfeb338927c77c9c | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/OrderedChannel.lean | OrderedChannel | 4 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 13 | 2 | [
{
"theorem_name": "guarantees_of_requirements_append",
"depth": 1,
"n_commands": 0,
"n_lines": 22,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n -- we show that for each (t, ss) pair, the assumptions of `*_cons` hold\n rintro constraints reqs parti... | [
{
"name": "guarantees_of_requirements_cons",
"text": "/--\nThe significance of `OrderedChannel` is that it lets us prove soundness\non a list of tables by induction. This lemma captures the main step.\n-/\nlemma guarantees_of_requirements_cons [DecidableEq F]\n -- given a list of tables, and one additional... | [
{
"name": "spec_and_guarantees_of_soundChannels",
"fan_in": 1,
"n_deps_direct": 3,
"n_deps_transitive": 3,
"n_lines": 49,
"n_chars": 2522,
"n_subproofs": 3,
"n_tactics": 35,
"cyclomatic": 7,
"n_automation": 6,
"n_rewrites": 2,
"n_structural": 16,
"automation_only"... | 3 | import Clean.Air.FlatEnsemble
variable {F : Type} [FiniteField F]
open Air.Flat (Component Table Tables)
-- TODO deduplicate and add to Basic
attribute [circuit_norm] forall_eq_or_imp List.mem_flatMap List.mem_map exists_exists_and_eq_and
not_exists not_and List.Subset.refl List.subset_append_of_subset_left List.su... | import Clean.Air.FlatEnsemble
variable {F : Type} [FiniteField F]
open Air.Flat (Component Table Tables)
-- TODO deduplicate and add to Basic
attribute [circuit_norm] forall_eq_or_imp List.mem_flatMap List.mem_map exists_exists_and_eq_and
not_exists not_and List.Subset.refl List.subset_append_of_subset_left List.su... | @@ -209,6 +209,65 @@
rw [Table.channelRequirements_iff_forall, same_data] at channel_reqs
exact ⟨ channel_reqs, extra_reqs ⟩
+/--
+The significance of `OrderedChannel` is that it lets us prove soundness
+on a list of tables by induction. This lemma captures the main step.
+-/
+lemma guarantees_of_requiremen... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_6378c25ddd81_5 | 335fd9f843752c51 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/OrderedChannel.lean | OrderedChannel | 5 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 13 | 2 | [
{
"theorem_name": "guarantees_of_requirements_append",
"depth": 1,
"n_commands": 0,
"n_lines": 22,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n -- we show that for each (t, ss) pair, the assumptions of `*_cons` hold\n rintro constraints reqs parti... | [
{
"name": "guarantees_of_requirements_cons",
"text": "/--\nThe significance of `OrderedChannel` is that it lets us prove soundness\non a list of tables by induction. This lemma captures the main step.\n-/\nlemma guarantees_of_requirements_cons [DecidableEq F]\n -- given a list of tables, and one additional... | [
{
"name": "empty_tableSoundness",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 8,
"n_lines": 7,
"n_chars": 351,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,
"max_ne... | 6 | import Clean.Air.FlatEnsemble
variable {F : Type} [FiniteField F]
open Air.Flat (Component Table Tables)
-- TODO deduplicate and add to Basic
attribute [circuit_norm] forall_eq_or_imp List.mem_flatMap List.mem_map exists_exists_and_eq_and
not_exists not_and List.Subset.refl List.subset_append_of_subset_left List.su... | import Clean.Air.FlatEnsemble
variable {F : Type} [FiniteField F]
open Air.Flat (Component Table Tables)
-- TODO deduplicate and add to Basic
attribute [circuit_norm] forall_eq_or_imp List.mem_flatMap List.mem_map exists_exists_and_eq_and
not_exists not_and List.Subset.refl List.subset_append_of_subset_left List.su... | @@ -209,6 +209,65 @@
rw [Table.channelRequirements_iff_forall, same_data] at channel_reqs
exact ⟨ channel_reqs, extra_reqs ⟩
+/--
+The significance of `OrderedChannel` is that it lets us prove soundness
+on a list of tables by induction. This lemma captures the main step.
+-/
+lemma guarantees_of_requiremen... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_6378c25ddd81_6 | 67d33828faf5a6df | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Air/OrderedChannel.lean | OrderedChannel | 6 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 13 | 3 | [
{
"theorem_name": "orderedChannel_append",
"depth": 1,
"n_commands": 0,
"n_lines": 16,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [orderedChannel_iff]\n constructor\n · rintro ⟨ordered_refl, ordered_split⟩\n simp_all\n construct... | [
{
"name": "orderedChannel_iff",
"text": "/-- Alternative, and sometimes more convenient, formulation of `OrderedChannel` -/\nlemma orderedChannel_iff (tables : List (Component F)) (channel : RawChannel F) :\n OrderedChannel channel tables ↔\n (∀ t ∈ tables, OrderedChannelRefl channel t) ∧\n ∀ ts ss, ... | [
{
"name": "orderedChannels_of_soundChannels_merge",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 3,
"n_lines": 20,
"n_chars": 981,
"n_subproofs": 0,
"n_tactics": 10,
"cyclomatic": 2,
"n_automation": 5,
"n_rewrites": 0,
"n_structural": 4,
"automation_only"... | 3 | import Clean.Air.FlatEnsemble
variable {F : Type} [FiniteField F]
open Air.Flat (Component Table Tables)
-- TODO deduplicate and add to Basic
attribute [circuit_norm] forall_eq_or_imp List.mem_flatMap List.mem_map exists_exists_and_eq_and
not_exists not_and List.Subset.refl List.subset_append_of_subset_left List.su... | import Clean.Air.FlatEnsemble
variable {F : Type} [FiniteField F]
open Air.Flat (Component Table Tables)
-- TODO deduplicate and add to Basic
attribute [circuit_norm] forall_eq_or_imp List.mem_flatMap List.mem_map exists_exists_and_eq_and
not_exists not_and List.Subset.refl List.subset_append_of_subset_left List.su... | @@ -79,21 +79,91 @@
simp only [exists_imp]
tauto
+/-- Alternative, and sometimes more convenient, formulation of `OrderedChannel` -/
+lemma orderedChannel_iff (tables : List (Component F)) (channel : RawChannel F) :
+ OrderedChannel channel tables ↔
+ (∀ t ∈ tables, OrderedChannelRefl channel t) ∧
+ ∀ ts... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_f32b017124eb_0 | 4ac15bb1be0f43e8 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Gadgets/SHA256/LowerSigma1.lean | LowerSigma1 | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 1 | 1 | [
{
"theorem_name": "soundness",
"depth": 1,
"n_commands": 0,
"n_lines": 46,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n circuit_proof_start [lowerSigma1, xor32]\n obtain ⟨h_holds1, h_holds2⟩ := h_holds\n have ha : ∀ i : Fin 32, input[i] = 0 ∨ inp... | [
{
"name": "spec_of_constraint",
"text": "private lemma spec_of_constraint\n (input z : fields 32 (F p))\n (hx : Normalized input)\n (h_z : ∀ i : Fin 32, z[i] =\n (input[(i + 17).val] + input[(i + 19).val] -\n 2 * input[(i + 17).val] * input[(i + 19).val])\n + (if h : i.val + 10 < 3... | [
{
"name": "soundness",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 48,
"n_chars": 2643,
"n_subproofs": 13,
"n_tactics": 52,
"cyclomatic": 1,
"n_automation": 5,
"n_rewrites": 2,
"n_structural": 10,
"automation_only": false,
"max_nesting"... | 1 | import Clean.Gadgets.SHA256.LowerSigma0
section
variable {p : ℕ} [Fact p.Prime]
namespace Gadgets.SHA256
/-!
# σ₁ (lower sigma 1) for SHA-256
σ₁(x) = ROTR17(x) XOR ROTR19(x) XOR SHR10(x)
Two xor32 calls = 64 witnesses total.
Mirrors `LowerSigma0` with constants 17, 19, 10 instead of 7, 18, 3.
Reuses the helper le... | import Clean.Gadgets.SHA256.LowerSigma0
section
variable {p : ℕ} [Fact p.Prime]
namespace Gadgets.SHA256
/-!
# σ₁ (lower sigma 1) for SHA-256
σ₁(x) = ROTR17(x) XOR ROTR19(x) XOR SHR10(x)
Two xor32 calls = 64 witnesses total.
Mirrors `LowerSigma0` with constants 17, 19, 10 instead of 7, 18, 3.
Reuses the helper le... | @@ -37,10 +37,135 @@
/-! ## Spec proof factored out to avoid kernel deep recursion -/
+private lemma spec_of_constraint
+ (input z : fields 32 (F p))
+ (hx : Normalized input)
+ (h_z : ∀ i : Fin 32, z[i] =
+ (input[(i + 17).val] + input[(i + 19).val] -
+ 2 * input[(i + 17).val] * input[(i + 19... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_784b19f39b4c_0 | 90c8374fbe55407f | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Utils/Bitwise.lean | Bitwise | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 2 | 1 | [
{
"theorem_name": "and_xor_sum",
"depth": 1,
"n_commands": 0,
"n_lines": 7,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [Nat.and_xor_distrib_left, Nat.and_xor_distrib_right]\n have zero0 : 2 ^ 8 * x1 &&& y0 = 0 := by rw [Nat.and_comm]; ... | [
{
"name": "and_mul_two_pow",
"text": "theorem and_mul_two_pow {x y n : ℕ} : 2 ^ n * (x &&& y) = 2 ^ n * x &&& 2 ^ n * y := by\n simp only [mul_comm]\n exact Nat.bitwise_mul_two_pow\n\n",
"fan_in": 1,
"n_lines": 5,
"n_chars": 148,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,... | [
{
"name": "and_xor_sum",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 10,
"n_chars": 471,
"n_subproofs": 2,
"n_tactics": 9,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 3,
"n_structural": 2,
"automation_only": false,
"max_nesting": ... | 2 | import Mathlib.Analysis.Normed.Ring.Lemmas
import Clean.Utils.Field
import Mathlib.Data.Nat.Bitwise
def not64 (a : ℕ) : ℕ := a ^^^ 0xffffffffffffffff
def add32 (a b : ℕ) : ℕ := (a + b) % 2^32
def rotRight8 (x : Fin 256) (offset : Fin 8) : Fin 256 :=
let low := x % (2^offset.val)
let high := x / (2^offset.val)
l... | import Mathlib.Analysis.Normed.Ring.Lemmas
import Clean.Utils.Field
import Mathlib.Data.Nat.Bitwise
def not64 (a : ℕ) : ℕ := a ^^^ 0xffffffffffffffff
def add32 (a b : ℕ) : ℕ := (a + b) % 2^32
def rotRight8 (x : Fin 256) (offset : Fin 8) : Fin 256 :=
let low := x % (2^offset.val)
let high := x / (2^offset.val)
l... | @@ -31,6 +31,10 @@
let right := (64 - left) % 64
rotRight64 value right
+theorem and_mul_two_pow {x y n : ℕ} : 2 ^ n * (x &&& y) = 2 ^ n * x &&& 2 ^ n * y := by
+ simp only [mul_comm]
+ exact Nat.bitwise_mul_two_pow
+
lemma and_mul_two_pow_lt {n : ℕ} {x : ℕ} (hx : x < 2^n) (y : ℕ) : x &&& 2^n * y = 0 := by... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_99f3b42fce97_0 | e095a4ab3f4c786a | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Utils/OfflineMemory.lean | OfflineMemory | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 19 | 2 | [
{
"theorem_name": "MemoryAccessList.isConsistentOnline_filter_of_consistentOnline",
"depth": 1,
"n_commands": 0,
"n_lines": 26,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n induction accesses with\n | nil =>\n simp only [filterAddress, List.fil... | [
{
"name": "MemoryAccessList.lastWriteValue_filter",
"text": "/--\n The last write value for a specific address is the same whether we compute it on the full list\n or on the filtered list on that address.\n-/\ntheorem MemoryAccessList.lastWriteValue_filter (accesses : MemoryAccessList)\n (h_sorted : ac... | [
{
"name": "MemoryAccessList.isConsistentOnline_filter_of_consistentOnline",
"fan_in": 1,
"n_deps_direct": 3,
"n_deps_transitive": 2,
"n_lines": 34,
"n_chars": 1593,
"n_subproofs": 4,
"n_tactics": 25,
"cyclomatic": 2,
"n_automation": 7,
"n_rewrites": 3,
"n_structural":... | 1 | import Clean.Circuit.Basic
import Clean.Circuit.Provable
import Clean.Gadgets.Equality
import Clean.Utils.Field
import Clean.Utils.Primes
import Clean.Utils.Tactics
import Mathlib.Data.List.Sort
/-
The purpose of this file is to define a memory model that can be checked using the Memory in the Head paradigm,
often als... | import Clean.Circuit.Basic
import Clean.Circuit.Provable
import Clean.Gadgets.Equality
import Clean.Utils.Field
import Clean.Utils.Primes
import Clean.Utils.Tactics
import Mathlib.Data.List.Sort
/-
The purpose of this file is to define a memory model that can be checked using the Memory in the Head paradigm,
often als... | @@ -260,6 +260,33 @@
MemoryAccessList.isConsistentSingleAddress ((t1, addr1, readValue1, writeValue1) :: rest) (List.Pairwise.of_cons h_sorted)
/--
+ The last write value for a specific address is the same whether we compute it on the full list
+ or on the filtered list on that address.
+-/
+theorem MemoryAcc... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_99f3b42fce97_1 | 0669235440d3ad8b | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Utils/OfflineMemory.lean | OfflineMemory | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 19 | 3 | [
{
"theorem_name": "MemoryAccessList.isConsistentSingleAddress_filterAddress_of_cons",
"depth": 1,
"n_commands": 0,
"n_lines": 8,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n obtain ⟨t, a, r, w⟩ := head\n have h_sorted_tail := isTimestampSorted_con... | [
{
"name": "MemoryAccessList.isConsistentSingleAddress_cons",
"text": "theorem MemoryAccessList.isConsistentSingleAddress_cons (head : MemoryAccess) (tail : MemoryAccessList)\n (h_sorted : isTimestampSorted (head :: tail)) (h_sorted' : tail.isTimestampSorted)\n (h : isConsistentSingleAddress (head :: t... | [
{
"name": "MemoryAccessList.isConsistentSingleAddress_cons_forall",
"fan_in": 1,
"n_deps_direct": 7,
"n_deps_transitive": 3,
"n_lines": 35,
"n_chars": 1849,
"n_subproofs": 6,
"n_tactics": 26,
"cyclomatic": 1,
"n_automation": 7,
"n_rewrites": 3,
"n_structural": 8,
... | 2 | import Clean.Circuit.Basic
import Clean.Circuit.Provable
import Clean.Gadgets.Equality
import Clean.Utils.Field
import Clean.Utils.Primes
import Clean.Utils.Tactics
import Mathlib.Data.List.Sort
/-
The purpose of this file is to define a memory model that can be checked using the Memory in the Head paradigm,
often als... | import Clean.Circuit.Basic
import Clean.Circuit.Provable
import Clean.Gadgets.Equality
import Clean.Utils.Field
import Clean.Utils.Primes
import Clean.Utils.Tactics
import Mathlib.Data.List.Sort
/-
The purpose of this file is to define a memory model that can be checked using the Memory in the Head paradigm,
often als... | @@ -269,12 +269,52 @@
readValue2 = writeValue1 ∧
MemoryAccessList.isConsistentSingleAddress ((t1, addr1, readValue1, writeValue1) :: rest) (List.Pairwise.of_cons h_sorted)
+theorem MemoryAccessList.isConsistentSingleAddress_cons (head : MemoryAccess) (tail : MemoryAccessList)
+ (h_sorted : isTimestampSor... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_99f3b42fce97_2 | d1d59e5faaf062f6 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Utils/OfflineMemory.lean | OfflineMemory | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 19 | 2 | [
{
"theorem_name": "MemoryAccessList.isConsistentOnline_filter_of_consistentOnline",
"depth": 1,
"n_commands": 0,
"n_lines": 26,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n induction accesses with\n | nil =>\n simp only [filterAddress, List.fil... | [
{
"name": "MemoryAccessList.lastWriteValue_filter",
"text": "/--\n The last write value for a specific address is the same whether we compute it on the full list\n or on the filtered list on that address.\n-/\ntheorem MemoryAccessList.lastWriteValue_filter (accesses : MemoryAccessList)\n (h_sorted : ac... | [
{
"name": "MemoryAccessList.isConsistent_iff_all_single_address",
"fan_in": 1,
"n_deps_direct": 7,
"n_deps_transitive": 7,
"n_lines": 56,
"n_chars": 2778,
"n_subproofs": 9,
"n_tactics": 41,
"cyclomatic": 3,
"n_automation": 11,
"n_rewrites": 2,
"n_structural": 14,
... | 6 | import Clean.Circuit.Basic
import Clean.Circuit.Provable
import Clean.Gadgets.Equality
import Clean.Utils.Field
import Clean.Utils.Primes
import Clean.Utils.Tactics
import Mathlib.Data.List.Sort
/-
The purpose of this file is to define a memory model that can be checked using the Memory in the Head paradigm,
often als... | import Clean.Circuit.Basic
import Clean.Circuit.Provable
import Clean.Gadgets.Equality
import Clean.Utils.Field
import Clean.Utils.Primes
import Clean.Utils.Tactics
import Mathlib.Data.List.Sort
/-
The purpose of this file is to define a memory model that can be checked using the Memory in the Head paradigm,
often als... | @@ -318,6 +318,33 @@
simp_all only [↓reduceIte, and_self]
/--
+ The last write value for a specific address is the same whether we compute it on the full list
+ or on the filtered list on that address.
+-/
+theorem MemoryAccessList.lastWriteValue_filter (accesses : MemoryAccessList)
+ (h_sorted : acces... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_99f3b42fce97_3 | f185bc2fb5853985 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Utils/OfflineMemory.lean | OfflineMemory | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 19 | 2 | [
{
"theorem_name": "MemoryAccessList.addressTimestampSort_noTimestampDup",
"depth": 1,
"n_commands": 0,
"n_lines": 3,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n apply noTimestampDup_perm accesses accesses.addressTimestampSort h_nodup\n exact (add... | [
{
"name": "MemoryAccessList.noTimestampDup_perm",
"text": "theorem MemoryAccessList.noTimestampDup_perm (l1 l2 : MemoryAccessList)\n (h_l1_nodup : l1.Notimestampdup) (h_perm : l1.Perm l2) :\n l2.Notimestampdup := by\n simp only [Notimestampdup] at *\n apply List.Pairwise.perm h_l1_nodup h_perm\n in... | [
{
"name": "MemoryAccessList.eq_of_perm_of_sorted",
"fan_in": 1,
"n_deps_direct": 3,
"n_deps_transitive": 3,
"n_lines": 28,
"n_chars": 1750,
"n_subproofs": 9,
"n_tactics": 13,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 1,
"automation_only"... | 3 | import Clean.Circuit.Basic
import Clean.Circuit.Provable
import Clean.Gadgets.Equality
import Clean.Utils.Field
import Clean.Utils.Primes
import Clean.Utils.Tactics
import Mathlib.Data.List.Sort
/-
The purpose of this file is to define a memory model that can be checked using the Memory in the Head paradigm,
often als... | import Clean.Circuit.Basic
import Clean.Circuit.Provable
import Clean.Gadgets.Equality
import Clean.Utils.Field
import Clean.Utils.Primes
import Clean.Utils.Tactics
import Mathlib.Data.List.Sort
/-
The purpose of this file is to define a memory model that can be checked using the Memory in the Head paradigm,
often als... | @@ -205,6 +205,17 @@
) h_no_timestamp_dup
exact h
+theorem MemoryAccessList.noTimestampDup_perm (l1 l2 : MemoryAccessList)
+ (h_l1_nodup : l1.Notimestampdup) (h_perm : l1.Perm l2) :
+ l2.Notimestampdup := by
+ simp only [Notimestampdup] at *
+ apply List.Pairwise.perm h_l1_nodup h_perm
+ intro x y hx... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_574cccea569a_0 | 2f6eaef99b3827d0 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Circomlib/Gates.lean | Gates | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 7 | 1 | [
{
"theorem_name": "subcircuitsConsistent",
"depth": 1,
"n_commands": 0,
"n_lines": 16,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n induction n using Nat.strong_induction_on generalizing offset with\n | _ n IH =>\n match n with\n | 0 => simp... | [
{
"name": "Circuit.subcircuitsConsistent_bind",
"text": "theorem Circuit.subcircuitsConsistent_bind {α β : Type} (f : Circuit (F p) α) (g : α → Circuit (F p) β) (offset : ℕ)\n (hf : Operations.SubcircuitsConsistent offset (f.operations offset))\n (hg : Operations.SubcircuitsConsistent (offset + f.loca... | [
{
"name": "subcircuitsConsistent",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 19,
"n_chars": 808,
"n_subproofs": 0,
"n_tactics": 14,
"cyclomatic": 3,
"n_automation": 7,
"n_rewrites": 0,
"n_structural": 5,
"automation_only": false,
"max... | 1 | import Clean.Circuit
import Clean.Utils.Field
import Clean.Gadgets.Boolean
import Clean.Utils.Bitwise
import Clean.Utils.Vector
import Clean.Utils.BinaryOps
import Clean.Circuit.Theorems
import Mathlib.Data.Nat.Bitwise
open IsBool
/-
Original source code:
https://github.com/iden3/circomlib/blob/master/circuits/gates.... | import Clean.Circuit
import Clean.Utils.Field
import Clean.Gadgets.Boolean
import Clean.Utils.Bitwise
import Clean.Utils.Vector
import Clean.Utils.BinaryOps
import Clean.Circuit.Theorems
import Mathlib.Data.Nat.Bitwise
open IsBool
/-
Original source code:
https://github.com/iden3/circomlib/blob/master/circuits/gates.... | @@ -310,6 +310,15 @@
omega
-- Helper lemma: SubcircuitsConsistent preserved by bind
+theorem Circuit.subcircuitsConsistent_bind {α β : Type} (f : Circuit (F p) α) (g : α → Circuit (F p) β) (offset : ℕ)
+ (hf : Operations.SubcircuitsConsistent offset (f.operations offset))
+ (hg : Operations.SubcircuitsC... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_574cccea569a_1 | 70c0ffb633cef4f1 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Circomlib/Gates.lean | Gates | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 7 | 1 | [
{
"theorem_name": "subcircuitChannelsLawful",
"depth": 1,
"n_commands": 0,
"n_lines": 14,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n induction n using Nat.strong_induction_on generalizing offset with\n | _ n IH =>\n match n with\n | 0 => s... | [
{
"name": "Circuit.subcircuitChannelsLawful_bind",
"text": "theorem Circuit.subcircuitChannelsLawful_bind {α β : Type} (f : Circuit (F p) α) (g : α → Circuit (F p) β) (offset : ℕ)\n (hf : (f.operations offset).SubcircuitChannelsLawful)\n (hg : ((g (f.output offset)).operations (offset + f.localLength ... | [
{
"name": "subcircuitChannelsLawful",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 17,
"n_chars": 660,
"n_subproofs": 0,
"n_tactics": 14,
"cyclomatic": 3,
"n_automation": 7,
"n_rewrites": 0,
"n_structural": 5,
"automation_only": false,
"... | 1 | import Clean.Circuit
import Clean.Utils.Field
import Clean.Gadgets.Boolean
import Clean.Utils.Bitwise
import Clean.Utils.Vector
import Clean.Utils.BinaryOps
import Clean.Circuit.Theorems
import Mathlib.Data.Nat.Bitwise
open IsBool
/-
Original source code:
https://github.com/iden3/circomlib/blob/master/circuits/gates.... | import Clean.Circuit
import Clean.Utils.Field
import Clean.Gadgets.Boolean
import Clean.Utils.Bitwise
import Clean.Utils.Vector
import Clean.Utils.BinaryOps
import Clean.Circuit.Theorems
import Mathlib.Data.Nat.Bitwise
open IsBool
/-
Original source code:
https://github.com/iden3/circomlib/blob/master/circuits/gates.... | @@ -319,6 +319,14 @@
rw [bind_forAll]
exact ⟨hf, hg⟩
+theorem Circuit.subcircuitChannelsLawful_bind {α β : Type} (f : Circuit (F p) α) (g : α → Circuit (F p) β) (offset : ℕ)
+ (hf : (f.operations offset).SubcircuitChannelsLawful)
+ (hg : ((g (f.output offset)).operations (offset + f.localLength offset)).S... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_574cccea569a_2 | 4c6c613eb84d62b4 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Circomlib/Gates.lean | Gates | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 7 | 1 | [
{
"theorem_name": "soundness",
"depth": 1,
"n_commands": 0,
"n_lines": 132,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n induction n using Nat.strong_induction_on with\n | _ n IH =>\n intro offset env input_var input h_input h_assumptions h_hol... | [
{
"name": "Vector.foldl_and_split",
"text": "/-- Key lemma: folding with &&& over a split vector equals the &&& of the folds over each part -/\nlemma Vector.foldl_and_split {n1 n2 n3 : ℕ} (v : Vector ℕ n3)\n (v1 : Vector ℕ n1) (v2 : Vector ℕ n2) (h_sum : n1 + n2 = n3)\n (h_split : v = h_sum ▸ (v1 ++ v... | [
{
"name": "soundness",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 140,
"n_chars": 6589,
"n_subproofs": 24,
"n_tactics": 131,
"cyclomatic": 20,
"n_automation": 60,
"n_rewrites": 15,
"n_structural": 31,
"automation_only": false,
"max_nes... | 1 | import Clean.Circuit
import Clean.Utils.Field
import Clean.Gadgets.Boolean
import Clean.Utils.Bitwise
import Clean.Utils.Vector
import Clean.Utils.BinaryOps
import Clean.Circuit.Theorems
import Mathlib.Data.Nat.Bitwise
open IsBool
/-
Original source code:
https://github.com/iden3/circomlib/blob/master/circuits/gates.... | import Clean.Circuit
import Clean.Utils.Field
import Clean.Gadgets.Boolean
import Clean.Utils.Bitwise
import Clean.Utils.Vector
import Clean.Utils.BinaryOps
import Clean.Circuit.Theorems
import Mathlib.Data.Nat.Bitwise
open IsBool
/-
Original source code:
https://github.com/iden3/circomlib/blob/master/circuits/gates.... | @@ -442,6 +442,35 @@
def Spec (n : ℕ) (input : fields n (F p)) (output : F p) : Prop :=
output.val = (input.map (·.val)).foldl (· &&& ·) 1 ∧ IsBool output
+/-- Key lemma: folding with &&& over a split vector equals the &&& of the folds over each part -/
+lemma Vector.foldl_and_split {n1 n2 n3 : ℕ} (v : Vector ℕ n... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_574cccea569a_3 | 5007ab63761c8621 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Circomlib/Gates.lean | Gates | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 7 | 1 | [
{
"theorem_name": "completeness",
"depth": 1,
"n_commands": 0,
"n_lines": 126,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n induction n using Nat.strong_induction_on with\n | _ n IH =>\n intro offset env input_var input h_local_witnesses h_env ... | [
{
"name": "completeness_one",
"text": "/-- Completeness for n = 1 case -/\nlemma completeness_one {p : ℕ} [Fact p.Prime]\n (offset : ℕ) (env : ProverEnvironment (F p)) (input_var : Var (fields 1) (F p))\n (input : fields 1 (F p))\n (_h_local_witnesses : env.UsesLocalWitnessesCompleteness offset ((m... | [
{
"name": "completeness",
"fan_in": 0,
"n_deps_direct": 4,
"n_deps_transitive": 4,
"n_lines": 134,
"n_chars": 6079,
"n_subproofs": 17,
"n_tactics": 117,
"cyclomatic": 14,
"n_automation": 34,
"n_rewrites": 11,
"n_structural": 42,
"automation_only": false,
"max_... | 4 | import Clean.Circuit
import Clean.Utils.Field
import Clean.Gadgets.Boolean
import Clean.Utils.Bitwise
import Clean.Utils.Vector
import Clean.Utils.BinaryOps
import Clean.Circuit.Theorems
import Mathlib.Data.Nat.Bitwise
open IsBool
/-
Original source code:
https://github.com/iden3/circomlib/blob/master/circuits/gates.... | import Clean.Circuit
import Clean.Utils.Field
import Clean.Gadgets.Boolean
import Clean.Utils.Bitwise
import Clean.Utils.Vector
import Clean.Utils.BinaryOps
import Clean.Circuit.Theorems
import Mathlib.Data.Nat.Bitwise
open IsBool
/-
Original source code:
https://github.com/iden3/circomlib/blob/master/circuits/gates.... | @@ -482,6 +482,17 @@
simp [main, ConstraintsHold.Completeness, Circuit.pure_operations_eq]
trivial
+/-- Completeness for n = 1 case -/
+lemma completeness_one {p : ℕ} [Fact p.Prime]
+ (offset : ℕ) (env : ProverEnvironment (F p)) (input_var : Var (fields 1) (F p))
+ (input : fields 1 (F p))
+ (_h_local_... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_5b17d5e6905f_0 | c7141dc59ecef016 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Gadgets/Keccak/RhoPi.lean | RhoPi | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 1 | 1 | [
{
"theorem_name": "soundness",
"depth": 1,
"n_commands": 0,
"n_lines": 14,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n circuit_proof_start [Rotation64.circuit, Rotation64.elaborated]\n\n -- simplify goal\n apply KeccakState.normalized_value_ext\... | [
{
"name": "rhoPi_loop",
"text": "lemma rhoPi_loop (state : Vector ℕ 25) :\n Specs.Keccak256.rhoPi state = rhoPiConstants.map fun (i, s) => rotLeft64 state[i.val] s := by\n simp [Specs.Keccak256.rhoPi, rhoPiConstants, rhoPiIndices, rhoPiShifts]\n\n",
"fan_in": 1,
"n_lines": 5,
"n_chars": 216,... | [
{
"name": "soundness",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 16,
"n_chars": 578,
"n_subproofs": 0,
"n_tactics": 9,
"cyclomatic": 1,
"n_automation": 5,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": false,
"max_nesting": 4
... | 1 | import Clean.Circuit.Loops
import Clean.Gadgets.Rotation64.Rotation64
import Clean.Gadgets.Keccak.KeccakState
import Clean.Specs.Keccak256
namespace Gadgets.Keccak256.RhoPi
variable {p : ℕ} [Fact p.Prime] [Fact (p > 2^16 + 2^8)]
instance : Fact (p > 512) := .mk (by linarith [‹Fact (p > _)›.elim])
def rhoPiIndices : V... | import Clean.Circuit.Loops
import Clean.Gadgets.Rotation64.Rotation64
import Clean.Gadgets.Keccak.KeccakState
import Clean.Specs.Keccak256
namespace Gadgets.Keccak256.RhoPi
variable {p : ℕ} [Fact p.Prime] [Fact (p > 2^16 + 2^8)]
instance : Fact (p > 512) := .mk (by linarith [‹Fact (p > _)›.elim])
def rhoPiIndices : V... | @@ -29,8 +29,25 @@
elaborate_circuit
-- recharacterize rhoPi as a loop
-theorem soundness : Soundness (F p) main Assumptions Spec := sorry
+lemma rhoPi_loop (state : Vector ℕ 25) :
+ Specs.Keccak256.rhoPi state = rhoPiConstants.map fun (i, s) => rotLeft64 state[i.val] s := by
+ simp [Specs.Keccak256.rhoPi, rh... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_d56809b46495_0 | 18c9a0e7fa41a4ed | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Gadgets/SHA256/SHA256Compress.lean | SHA256Compress | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 5 | 1 | [
{
"theorem_name": "valueBits_constWord32_of_lt",
"depth": 1,
"n_commands": 0,
"n_lines": 2,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rw [valueBits_constWord32, Nat.mod_eq_of_lt h]",
"n_chars": 52,
"n_subproofs": 0,
"n_tactics": 2,
... | [
{
"name": "valueBits_constWord32",
"text": "/-- valueBits of `constWord32 n` equals `n` modulo `2^32`. -/\nprivate lemma valueBits_constWord32 (env : Environment (F p)) (n : ℕ) :\n valueBits (Vector.map (Expression.eval env) (constWord32 (p:=p) n)) = n % 2^32 := by\n simp only [valueBits, constWord32]\n... | [
{
"name": "valueBits_constWord32_of_lt",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 6,
"n_chars": 287,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 1,
"n_structural": 0,
"automation_only": false,
... | 1 | import Clean.Gadgets.SHA256.SHA256Round
import Clean.Gadgets.SHA256.SHA256Schedule
import Clean.Gadgets.SHA256.Add32
import Clean.Specs.SHA256
section
variable {p : ℕ} [Fact p.Prime] [Fact (p > 2^33)]
instance fact_p_gt_2_of_2_pow_33 : Fact (p > 2) := .mk (by
have h : (2 : ℕ) < 2^33 := by decide
exact h.trans (Fa... | import Clean.Gadgets.SHA256.SHA256Round
import Clean.Gadgets.SHA256.SHA256Schedule
import Clean.Gadgets.SHA256.Add32
import Clean.Specs.SHA256
section
variable {p : ℕ} [Fact p.Prime] [Fact (p > 2^33)]
instance fact_p_gt_2_of_2_pow_33 : Fact (p > 2) := .mk (by
have h : (2 : ℕ) < 2^33 := by decide
exact h.trans (Fa... | @@ -121,9 +121,45 @@
· right
simp [constWord32, Expression.eval, h]
+/-- valueBits of `constWord32 n` equals `n` modulo `2^32`. -/
+private lemma valueBits_constWord32 (env : Environment (F p)) (n : ℕ) :
+ valueBits (Vector.map (Expression.eval env) (constWord32 (p:=p) n)) = n % 2^32 := by
+ simp only [va... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_d56809b46495_2 | 0709d80a21573fc9 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Gadgets/SHA256/SHA256Compress.lean | SHA256Compress | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 5 | 2 | [
{
"theorem_name": "soundness",
"depth": 1,
"n_commands": 0,
"n_lines": 69,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n circuit_proof_start [SHA256Round.Spec, SHA256Round.Assumptions]\n obtain ⟨h_state_norm, h_sched_norm⟩ := h_assumptions\n obtai... | [
{
"name": "foldlAcc_eq_stateVar",
"text": "/-- `Circuit.FoldlM.foldlAcc` at index `⟨k, h⟩ : Fin 64` equals `stateVar i₀ input_var_state k`.\n\n Uses `SHA256State (Expression (F p))` for the accumulator type (not the\n `Var SHA256State (F p)` alias) so the lemma's pattern matches `h_holds`\n syntact... | [
{
"name": "completeness",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 3,
"n_lines": 59,
"n_chars": 2673,
"n_subproofs": 12,
"n_tactics": 54,
"cyclomatic": 2,
"n_automation": 5,
"n_rewrites": 14,
"n_structural": 19,
"automation_only": false,
"max_nest... | 2 | import Clean.Gadgets.SHA256.SHA256Round
import Clean.Gadgets.SHA256.SHA256Schedule
import Clean.Gadgets.SHA256.Add32
import Clean.Specs.SHA256
section
variable {p : ℕ} [Fact p.Prime] [Fact (p > 2^33)]
instance fact_p_gt_2_of_2_pow_33 : Fact (p > 2) := .mk (by
have h : (2 : ℕ) < 2^33 := by decide
exact h.trans (Fa... | import Clean.Gadgets.SHA256.SHA256Round
import Clean.Gadgets.SHA256.SHA256Schedule
import Clean.Gadgets.SHA256.Add32
import Clean.Specs.SHA256
section
variable {p : ℕ} [Fact p.Prime] [Fact (p > 2^33)]
instance fact_p_gt_2_of_2_pow_33 : Fact (p > 2) := .mk (by
have h : (2 : ℕ) < 2^33 := by decide
exact h.trans (Fa... | @@ -89,6 +89,27 @@
Vector.mapRange 32 fun i_1 => var { index := i₀ + i.val * 455 + 422 + i_1 },
acc[4], acc[5], acc[6]]) input_var_state from rfl, ih]
+/-- `Circuit.FoldlM.foldlAcc` at index `⟨k, h⟩ : Fin 64` equals `stateVar i₀ input_var_state k`.
+
+ Uses `SHA256State (Expression ... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-delete-lem... |
ablate_4c5e67786e11_0 | cb8bab4041559963 | lean | lean | github.com/Verified-zkEVM/clean | 1e563b9c27991b3795eb440c1ee0757edb4ce8b1 | Clean/Gadgets/SHA256/UpperSigma0.lean | UpperSigma0 | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 1 | 1 | [
{
"theorem_name": "soundness",
"depth": 1,
"n_commands": 0,
"n_lines": 45,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n circuit_proof_start [upperSigma0, xor32]\n obtain ⟨h_holds1, h_holds2⟩ := h_holds\n have ha : ∀ i : Fin 32, input[i] = 0 ∨ inp... | [
{
"name": "spec_of_constraint",
"text": "private lemma spec_of_constraint\n (input z : fields 32 (F p))\n (hx : Normalized input)\n (h_z : ∀ i : Fin 32, z[i] =\n (input[(i + 2).val] + input[(i + 13).val] -\n 2 * input[(i + 2).val] * input[(i + 13).val])\n + input[(i + 22).val]\n ... | [
{
"name": "soundness",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 47,
"n_chars": 2524,
"n_subproofs": 13,
"n_tactics": 51,
"cyclomatic": 1,
"n_automation": 5,
"n_rewrites": 2,
"n_structural": 10,
"automation_only": false,
"max_nesting"... | 1 | import Clean.Gadgets.SHA256.LowerSigma0
section
variable {p : ℕ} [Fact p.Prime]
namespace Gadgets.SHA256
/-!
# Σ₀ (upper sigma 0) for SHA-256
Σ₀(x) = ROTR2(x) XOR ROTR13(x) XOR ROTR22(x)
Two xor32 calls = 64 witnesses total.
Mirrors `LowerSigma0` but with three rotations (no shift) and constants 2, 13, 22.
Reuses... | import Clean.Gadgets.SHA256.LowerSigma0
section
variable {p : ℕ} [Fact p.Prime]
namespace Gadgets.SHA256
/-!
# Σ₀ (upper sigma 0) for SHA-256
Σ₀(x) = ROTR2(x) XOR ROTR13(x) XOR ROTR22(x)
Two xor32 calls = 64 witnesses total.
Mirrors `LowerSigma0` but with three rotations (no shift) and constants 2, 13, 22.
Reuses... | @@ -36,10 +36,128 @@
/-! ## Spec proof factored out to avoid kernel deep recursion -/
+private lemma spec_of_constraint
+ (input z : fields 32 (F p))
+ (hx : Normalized input)
+ (h_z : ∀ i : Fin 32, z[i] =
+ (input[(i + 2).val] + input[(i + 13).val] -
+ 2 * input[(i + 2).val] * input[(i + 13).... | {
"repo": "clean",
"git_repo": "github.com/Verified-zkEVM/clean",
"revision": "1e563b9c27991b3795eb440c1ee0757edb4ce8b1",
"lean_toolchain": "leanprover/lean4:v4.30.0",
"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.