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_4fb6439d30ec_10 | 58512667235a3c9a | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/SymCC/Data/BitVec.lean | BitVec | 10 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 18 | 1 | [
{
"theorem_name": "toInt_sdiv_eq_tdiv_toInt",
"depth": 1,
"n_commands": 0,
"n_lines": 85,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n cases hmsb₁ : bv₁.msb\n case false =>\n have hi₁ : 0 ≤ bv₁.toInt := by\n simp only [BitVec.msb_eq_toInt,... | [
{
"name": "BitVec.msb_true_toNat_eq_neg_toInt",
"text": "private theorem BitVec.msb_true_toNat_eq_neg_toInt {bv : BitVec 64} {n : Nat}\n (hmsb : bv.msb = true) (h : bv.toInt = Int.negSucc n) :\n (-bv).toNat = n.succ\n:= by\n have h₀ : (-bv).toNat = 2^64 - bv.toNat := by\n have h₀ := BitVec.toNat_n... | [
{
"name": "toInt_sdiv_eq_tdiv_toInt",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 90,
"n_chars": 4341,
"n_subproofs": 15,
"n_tactics": 90,
"cyclomatic": 7,
"n_automation": 40,
"n_rewrites": 2,
"n_structural": 14,
"automation_only": false,
... | 2 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -89,10 +89,113 @@
rw [← BitVec.neg_inj, BitVec.neg_intMin]
exact h₃
+private theorem BitVec.msb_true_toNat_eq_neg_toInt {bv : BitVec 64} {n : Nat}
+ (hmsb : bv.msb = true) (h : bv.toInt = Int.negSucc n) :
+ (-bv).toNat = n.succ
+:= by
+ have h₀ : (-bv).toNat = 2^64 - bv.toNat := by
+ have h... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_4fb6439d30ec_11 | 54f79b460a15dfeb | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/SymCC/Data/BitVec.lean | BitVec | 11 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 18 | 3 | [
{
"theorem_name": "sdiv_pos_lt_INT64_MAX",
"depth": 1,
"n_commands": 0,
"n_lines": 87,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have h₀ : bv₂.msb = false := by\n simp only [msb_eq_toInt, decide_eq_false_iff_not, Int.not_lt]\n exact Int.le... | [
{
"name": "msb_false_implies_neg_msb_eq",
"text": "private theorem msb_false_implies_neg_msb_eq {n : Nat} {bv : BitVec n}\n (h : bv.msb = false) :\n bv.neg = 0#n ∨ (bv.neg.msb = true ∧ (intMin n).toInt < bv.neg.toInt)\n:= by\n simp only [BitVec.neg_eq, BitVec.msb_neg, h, Bool.xor_false]\n cases h₁ : bv ... | [
{
"name": "sdiv_pos_bounded",
"fan_in": 1,
"n_deps_direct": 3,
"n_deps_transitive": 7,
"n_lines": 46,
"n_chars": 1991,
"n_subproofs": 8,
"n_tactics": 45,
"cyclomatic": 2,
"n_automation": 15,
"n_rewrites": 2,
"n_structural": 11,
"automation_only": false,
"max_n... | 7 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -76,6 +76,41 @@
· simp only [Int.cast_ofNat_Int, heq, Int.toNat_natCast]
· simp only [Int.toNat, Int.cast_ofNat_Int, Int.sub_emod_right, heq]
+private theorem msb_false_implies_neg_msb_eq {n : Nat} {bv : BitVec n}
+ (h : bv.msb = false) :
+ bv.neg = 0#n ∨ (bv.neg.msb = true ∧ (intMin n).toInt < bv.neg.toIn... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_4fb6439d30ec_12 | d3849505cbe8c86a | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/SymCC/Data/BitVec.lean | BitVec | 12 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 18 | 3 | [
{
"theorem_name": "sdiv_pos_lt_INT64_MAX",
"depth": 1,
"n_commands": 0,
"n_lines": 87,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have h₀ : bv₂.msb = false := by\n simp only [msb_eq_toInt, decide_eq_false_iff_not, Int.not_lt]\n exact Int.le... | [
{
"name": "msb_false_implies_neg_msb_eq",
"text": "private theorem msb_false_implies_neg_msb_eq {n : Nat} {bv : BitVec n}\n (h : bv.msb = false) :\n bv.neg = 0#n ∨ (bv.neg.msb = true ∧ (intMin n).toInt < bv.neg.toInt)\n:= by\n simp only [BitVec.neg_eq, BitVec.msb_neg, h, Bool.xor_false]\n cases h₁ : bv ... | [
{
"name": "mul_toInt_sdiv_eq_toInt_mul_sdiv",
"fan_in": 0,
"n_deps_direct": 4,
"n_deps_transitive": 13,
"n_lines": 12,
"n_chars": 700,
"n_subproofs": 1,
"n_tactics": 8,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": fals... | 13 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -142,6 +142,41 @@
simp only [Int.neg_zero] at h₁
exact mul_left_tdiv_right_pos_le h₁ h₂
+private theorem msb_false_implies_neg_msb_eq {n : Nat} {bv : BitVec n}
+ (h : bv.msb = false) :
+ bv.neg = 0#n ∨ (bv.neg.msb = true ∧ (intMin n).toInt < bv.neg.toInt)
+:= by
+ simp only [BitVec.neg_eq, BitVec.msb_neg,... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_fd6901a59121_0 | 3881c741b9300445 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/WellTyped/Expr/Typechecking.lean | Typechecking | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 16 | 1 | [
{
"theorem_name": "typechecked_is_well_typed_after_lifting_get_attr",
"depth": 1,
"n_commands": 0,
"n_lines": 33,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro h₃\n simp only [typeOf] at h₃\n generalize hᵢ : typeOf x₁ c₁ env = res₁\n cases ... | [
{
"name": "typechecked_is_well_typed_after_lifting_get_attr_in_record",
"text": "theorem typechecked_is_well_typed_after_lifting_get_attr_in_record\n{x₁ : Expr}\n{c₁ c₂ : Capabilities}\n{attr : Attr}\n{tc : TypedExpr × Capabilities}\n{rty : Data.Map Attr (Qualified CedarType)}\n{a : CedarType}\n(h₃ : getAtt... | [
{
"name": "typechecked_is_well_typed_after_lifting_get_attr",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 44,
"n_chars": 1742,
"n_subproofs": 0,
"n_tactics": 33,
"cyclomatic": 6,
"n_automation": 12,
"n_rewrites": 2,
"n_structural": 10,
"aut... | 1 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -27,6 +27,44 @@
open Cedar.Validation
open Cedar.Spec
+theorem typechecked_is_well_typed_after_lifting_get_attr_in_record
+{x₁ : Expr}
+{c₁ c₂ : Capabilities}
+{attr : Attr}
+{tc : TypedExpr × Capabilities}
+{rty : Data.Map Attr (Qualified CedarType)}
+{a : CedarType}
+(h₃ : getAttrInRecord tc.fst.typeOf rty x₁ ... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_fd6901a59121_1 | 265f7821a3274803 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/WellTyped/Expr/Typechecking.lean | Typechecking | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 16 | 1 | [
{
"theorem_name": "typechecked_is_well_typed_after_lifting_call",
"depth": 1,
"n_commands": 0,
"n_lines": 361,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro h₃\n simp [typeOf] at h₃\n simp [List.mapM₁_eq_mapM (λ x => justType (typeOf x c₁ en... | [
{
"name": "typechecked_is_well_typed_after_lifting_call_arg",
"text": "theorem typechecked_is_well_typed_after_lifting_call_arg\n{c₁: Capabilities}\n{env : TypeEnv}\n{xs : List Expr}\n{tys : List TypedExpr}\n(hᵢ : List.Forall₂ (fun x y => justType (typeOf x c₁ env) = Except.ok y) xs tys)\n(hᵢ₁ : ∀ (x₁ : Exp... | [
{
"name": "typechecked_is_well_typed_after_lifting_call",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 374,
"n_chars": 14881,
"n_subproofs": 0,
"n_tactics": 396,
"cyclomatic": 138,
"n_automation": 142,
"n_rewrites": 66,
"n_structural": 120,
... | 1 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -27,6 +27,30 @@
open Cedar.Validation
open Cedar.Spec
+theorem typechecked_is_well_typed_after_lifting_call_arg
+{c₁: Capabilities}
+{env : TypeEnv}
+{xs : List Expr}
+{tys : List TypedExpr}
+(hᵢ : List.Forall₂ (fun x y => justType (typeOf x c₁ env) = Except.ok y) xs tys)
+(hᵢ₁ : ∀ (x₁ : Expr),
+ x₁ ∈ xs →
+ ... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_fd6901a59121_2 | f3acc7a8f2939671 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/WellTyped/Expr/Typechecking.lean | Typechecking | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 16 | 1 | [
{
"theorem_name": "typechecked_is_well_typed_after_lifting_set",
"depth": 1,
"n_commands": 0,
"n_lines": 48,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro h₃\n simp [typeOf, List.mapM₁_eq_mapM fun x => justType (typeOf x c₁ env)] at h₃\n gen... | [
{
"name": "foldM_lub_some",
"text": "theorem foldM_lub_some {x y: CedarType} {xs : List CedarType} :\n List.foldlM lub? x xs = some y →\n ∀ t ∈ xs, t ⊑ y\n:= by\n induction xs generalizing x\n case nil =>\n simp\n case cons head tail hᵢ =>\n intro h\n simp at h\n generalize heq : (x ⊔ head)... | [
{
"name": "typechecked_is_well_typed_after_lifting_set",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 60,
"n_chars": 2383,
"n_subproofs": 2,
"n_tactics": 53,
"cyclomatic": 15,
"n_automation": 17,
"n_rewrites": 3,
"n_structural": 15,
"automat... | 1 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -27,6 +27,27 @@
open Cedar.Validation
open Cedar.Spec
+theorem foldM_lub_some {x y: CedarType} {xs : List CedarType} :
+ List.foldlM lub? x xs = some y →
+ ∀ t ∈ xs, t ⊑ y
+:= by
+ induction xs generalizing x
+ case nil =>
+ simp
+ case cons head tail hᵢ =>
+ intro h
+ simp at h
+ generalize heq... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_fd6901a59121_3 | eda4d5bb719443cf | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/WellTyped/Expr/Typechecking.lean | Typechecking | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 16 | 1 | [
{
"theorem_name": "typechecked_is_well_typed_after_lifting_record",
"depth": 1,
"n_commands": 0,
"n_lines": 26,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro h₃\n simp only [typeOf, List.empty_eq] at h₃\n rw [List.mapM₂_eq_mapM λ (x : Attr ×... | [
{
"name": "record_lifting_make",
"text": "theorem record_lifting_make {tys : List (Attr × TypedExpr)} :\n RecordType.liftBoolTypes\n (Data.Map.make (List.map (fun x => (x.fst, Qualified.required x.snd.typeOf)) tys)) =\n Data.Map.make\n (List.map (fun x => (x.fst, Qualified.required x.snd.typeOf))\n ... | [
{
"name": "typechecked_is_well_typed_after_lifting_record",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 38,
"n_chars": 1651,
"n_subproofs": 0,
"n_tactics": 28,
"cyclomatic": 10,
"n_automation": 8,
"n_rewrites": 4,
"n_structural": 11,
"autom... | 1 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -27,6 +27,40 @@
open Cedar.Validation
open Cedar.Spec
+theorem record_lifting_make {tys : List (Attr × TypedExpr)} :
+ RecordType.liftBoolTypes
+ (Data.Map.make (List.map (fun x => (x.fst, Qualified.required x.snd.typeOf)) tys)) =
+ Data.Map.make
+ (List.map (fun x => (x.fst, Qualified.required x.snd.typ... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_fd6901a59121_4 | 6e706626f5f47672 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/WellTyped/Expr/Typechecking.lean | Typechecking | 4 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 16 | 1 | [
{
"theorem_name": "typechecked_is_well_typed_after_lifting_record",
"depth": 1,
"n_commands": 0,
"n_lines": 26,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro h₃\n simp only [typeOf, List.empty_eq] at h₃\n rw [List.mapM₂_eq_mapM λ (x : Attr ×... | [
{
"name": "record_lifting_make",
"text": "theorem record_lifting_make {tys : List (Attr × TypedExpr)} :\n RecordType.liftBoolTypes\n (Data.Map.make (List.map (fun x => (x.fst, Qualified.required x.snd.typeOf)) tys)) =\n Data.Map.make\n (List.map (fun x => (x.fst, Qualified.required x.snd.typeOf))\n ... | [
{
"name": "typechecked_is_well_typed_after_lifting",
"fan_in": 0,
"n_deps_direct": 12,
"n_deps_transitive": 16,
"n_lines": 37,
"n_chars": 1434,
"n_subproofs": 0,
"n_tactics": 26,
"cyclomatic": 2,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 13,
"automation_... | 16 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -1280,6 +1280,40 @@
exact lifted_type_is_top heq
· simp only [bne_iff_ne, ne_eq, reduceCtorEq, not_false_eq_true]
+theorem record_lifting_make {tys : List (Attr × TypedExpr)} :
+ RecordType.liftBoolTypes
+ (Data.Map.make (List.map (fun x => (x.fst, Qualified.required x.snd.typeOf)) tys)) =
+ Data.Ma... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_b7218a9b4ec3_0 | 767c258fa6c2029f | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Data/Int64.lean | Int64 | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 1 | 1 | [
{
"theorem_name": "smod_result_nonneg",
"depth": 1,
"n_commands": 0,
"n_lines": 6,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro hb\n simp only [Int64.smod, Int64.le_iff_toInt_le, Int64.lt_iff_toInt_lt,\n Int64.toInt_ofBitVec, BitVec.toInt... | [
{
"name": "toInt_smod",
"text": "public theorem toInt_smod (a b : Int64) : (smod a b).toInt = a.toInt.fmod b.toInt := by\n simp only [Int64.smod, Int64.toInt_ofBitVec, BitVec.toInt_smod, Int64.toInt_toBitVec]\n\n",
"fan_in": 1,
"n_lines": 4,
"n_chars": 177,
"n_subproofs": 0,
"n_tactics"... | [
{
"name": "smod_result_nonneg",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 11,
"n_chars": 379,
"n_subproofs": 0,
"n_tactics": 6,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 0,
"n_structural": 2,
"automation_only": false,
"max_nes... | 1 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -65,8 +65,16 @@
public theorem smod_result_nonneg {a b : Int64} :
b > 0 →
0 <= smod a b ∧ smod a b < b
-:= sorry
+:= by
+ intro hb
+ simp only [Int64.smod, Int64.le_iff_toInt_le, Int64.lt_iff_toInt_lt,
+ Int64.toInt_ofBitVec, BitVec.toInt_smod, Int64.toInt_toBitVec]
+ simp only [GT.gt, Int64.lt_iff_toIn... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_0 | beef9ccdc79b5720 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 10 | [
{
"theorem_name": "wf_implies_tail_wf",
"depth": 1,
"n_commands": 0,
"n_lines": 10,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have := wf_iff_sorted.mp hwf\n cases tl with\n | nil =>\n simp [Map.WellFormed, Map.toList, make, List.canonicaliz... | [
{
"name": "wf_iff_sorted",
"text": "public theorem wf_iff_sorted {α β} [LT α] [DecidableLT α] [StrictLT α] {m : Map α β} :\n m.WellFormed ↔ m.toList.SortedBy Prod.fst\n:= by\n constructor\n case mp =>\n intro h\n rw [WellFormed, make] at h\n rw [h, toList]\n simp only [List.canonicalize_sorte... | [
{
"name": "wf_implies_tail_wf",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 16,
"n_chars": 418,
"n_subproofs": 1,
"n_tactics": 10,
"cyclomatic": 3,
"n_automation": 3,
"n_rewrites": 0,
"n_structural": 3,
"automation_only": false,
"max_ne... | 1 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -39,11 +39,35 @@
public def WellFormed {α β} [LT α] [DecidableLT α] (m : Map α β) :=
m = Map.make m.toList
+public theorem wf_iff_sorted {α β} [LT α] [DecidableLT α] [StrictLT α] {m : Map α β} :
+ m.WellFormed ↔ m.toList.SortedBy Prod.fst
+:= by
+ constructor
+ case mp =>
+ intro h
+ rw [WellFormed, m... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_1 | 94191f215c323dc8 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 10 | [
{
"theorem_name": "wf_implies_tail_wf",
"depth": 1,
"n_commands": 0,
"n_lines": 10,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have := wf_iff_sorted.mp hwf\n cases tl with\n | nil =>\n simp [Map.WellFormed, Map.toList, make, List.canonicaliz... | [
{
"name": "wf_iff_sorted",
"text": "public theorem wf_iff_sorted {α β} [LT α] [DecidableLT α] [StrictLT α] {m : Map α β} :\n m.WellFormed ↔ m.toList.SortedBy Prod.fst\n:= by\n constructor\n case mp =>\n intro h\n rw [WellFormed, make] at h\n rw [h, toList]\n simp only [List.canonicalize_sorte... | [
{
"name": "key_maps_to_one_value",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 16,
"n_chars": 479,
"n_subproofs": 1,
"n_tactics": 5,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": false,
"max_... | 1 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -39,6 +39,21 @@
public def WellFormed {α β} [LT α] [DecidableLT α] (m : Map α β) :=
m = Map.make m.toList
+public theorem wf_iff_sorted {α β} [LT α] [DecidableLT α] [StrictLT α] {m : Map α β} :
+ m.WellFormed ↔ m.toList.SortedBy Prod.fst
+:= by
+ constructor
+ case mp =>
+ intro h
+ rw [WellFormed, ma... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_2 | 9bbf7bd100c72781 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 10 | [
{
"theorem_name": "wf_implies_tail_wf",
"depth": 1,
"n_commands": 0,
"n_lines": 10,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have := wf_iff_sorted.mp hwf\n cases tl with\n | nil =>\n simp [Map.WellFormed, Map.toList, make, List.canonicaliz... | [
{
"name": "wf_iff_sorted",
"text": "public theorem wf_iff_sorted {α β} [LT α] [DecidableLT α] [StrictLT α] {m : Map α β} :\n m.WellFormed ↔ m.toList.SortedBy Prod.fst\n:= by\n constructor\n case mp =>\n intro h\n rw [WellFormed, make] at h\n rw [h, toList]\n simp only [List.canonicalize_sorte... | [
{
"name": "eq_iff_toList_equiv",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 24,
"n_chars": 637,
"n_subproofs": 1,
"n_tactics": 11,
"cyclomatic": 2,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 5,
"automation_only": false,
"max_n... | 2 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -39,6 +39,21 @@
public def WellFormed {α β} [LT α] [DecidableLT α] (m : Map α β) :=
m = Map.make m.toList
+public theorem wf_iff_sorted {α β} [LT α] [DecidableLT α] [StrictLT α] {m : Map α β} :
+ m.WellFormed ↔ m.toList.SortedBy Prod.fst
+:= by
+ constructor
+ case mp =>
+ intro h
+ rw [WellFormed, ma... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_3 | 7a599333276b1868 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 10 | [
{
"theorem_name": "wf_implies_tail_wf",
"depth": 1,
"n_commands": 0,
"n_lines": 10,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have := wf_iff_sorted.mp hwf\n cases tl with\n | nil =>\n simp [Map.WellFormed, Map.toList, make, List.canonicaliz... | [
{
"name": "wf_iff_sorted",
"text": "public theorem wf_iff_sorted {α β} [LT α] [DecidableLT α] [StrictLT α] {m : Map α β} :\n m.WellFormed ↔ m.toList.SortedBy Prod.fst\n:= by\n constructor\n case mp =>\n intro h\n rw [WellFormed, make] at h\n rw [h, toList]\n simp only [List.canonicalize_sorte... | [
{
"name": "keys_wf",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 14,
"n_chars": 398,
"n_subproofs": 0,
"n_tactics": 10,
"cyclomatic": 1,
"n_automation": 5,
"n_rewrites": 1,
"n_structural": 3,
"automation_only": false,
"max_nesting": 2
... | 1 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -39,6 +39,21 @@
public def WellFormed {α β} [LT α] [DecidableLT α] (m : Map α β) :=
m = Map.make m.toList
+public theorem wf_iff_sorted {α β} [LT α] [DecidableLT α] [StrictLT α] {m : Map α β} :
+ m.WellFormed ↔ m.toList.SortedBy Prod.fst
+:= by
+ constructor
+ case mp =>
+ intro h
+ rw [WellFormed, ma... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_4 | 621a2f58cdd3d637 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 4 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 5 | [
{
"theorem_name": "find?_some_implies_contains",
"depth": 1,
"n_commands": 0,
"n_lines": 4,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intros h\n apply contains_iff_some_find?.mpr\n simp [h]",
"n_chars": 61,
"n_subproofs": 0,
"n_tac... | [
{
"name": "contains_iff_some_find?",
"text": "public theorem contains_iff_some_find? {α β} [BEq α] {m : Map α β} {k : α} :\n m.contains k ↔ ∃ v, m.find? k = .some v\n:= by simp [contains, Option.isSome_iff_exists]\n\n",
"fan_in": 5,
"n_lines": 5,
"n_chars": 178,
"n_subproofs": 0,
"n_tac... | [
{
"name": "find?_some_implies_contains",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 8,
"n_chars": 200,
"n_subproofs": 0,
"n_tactics": 4,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 2,
"automation_only": false,
... | 1 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -117,9 +117,16 @@
(mk kvs).toList = kvs
:= by simp only [toList]
+public theorem contains_iff_some_find? {α β} [BEq α] {m : Map α β} {k : α} :
+ m.contains k ↔ ∃ v, m.find? k = .some v
+:= by simp [contains, Option.isSome_iff_exists]
+
public theorem find?_some_implies_contains {α β} [BEq α] {m : Map α β} {k... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_5 | 2f7969ca7a04d983 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 5 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 1 | [
{
"theorem_name": "make_singleton",
"depth": 1,
"n_commands": 0,
"n_lines": 3,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rw [←make_eq_mk]\n exact List.SortedBy.cons_nil",
"n_chars": 55,
"n_subproofs": 0,
"n_tactics": 3,
"cycloma... | [
{
"name": "make_eq_mk",
"text": "public theorem make_eq_mk [LT α] [StrictLT α] [DecidableLT α] {xs : List (α × β)} :\n xs.SortedBy Prod.fst ↔ Map.make xs = Map.mk xs\n:= by\n constructor <;> intro h\n case mp =>\n simp only [make, List.sortedBy_implies_canonicalize_eq h]\n case mpr =>\n simp only ... | [
{
"name": "make_singleton",
"fan_in": 2,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 7,
"n_chars": 186,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 1,
"n_structural": 1,
"automation_only": false,
"max_nesting"... | 1 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -126,9 +126,22 @@
(Map.empty : Map α β).find? k = none
:= by simp [empty, find?, toList]
+public theorem make_eq_mk [LT α] [StrictLT α] [DecidableLT α] {xs : List (α × β)} :
+ xs.SortedBy Prod.fst ↔ Map.make xs = Map.mk xs
+:= by
+ constructor <;> intro h
+ case mp =>
+ simp only [make, List.sortedBy_imp... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_6 | 4ff70c856250b3c6 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 6 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 2 | [
{
"theorem_name": "singleton_find?",
"depth": 1,
"n_commands": 0,
"n_lines": 1,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by simp [Map.find?, Map.make_singleton, toList_mk_id]",
"n_chars": 54,
"n_subproofs": 0,
"n_tactics": 1,
"cycloma... | [
{
"name": "make_singleton",
"text": "public theorem make_singleton [LT α] [DecidableLT α] [StrictLT α] (k : α) (v : β) :\n Map.make [(k, v)] = Map.mk [(k, v)]\n:= by\n rw [←make_eq_mk]\n exact List.SortedBy.cons_nil\n\n",
"fan_in": 2,
"n_lines": 7,
"n_chars": 186,
"n_subproofs": 0,
"n... | [
{
"name": "singleton_find?",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 3,
"n_lines": 6,
"n_chars": 213,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": true,
"max_nesting"... | 2 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -137,6 +137,12 @@
rw [← h]
exact List.canonicalize_sortedBy _ _
+public theorem make_singleton [LT α] [DecidableLT α] [StrictLT α] (k : α) (v : β) :
+ Map.make [(k, v)] = Map.mk [(k, v)]
+:= by
+ rw [←make_eq_mk]
+ exact List.SortedBy.cons_nil
+
@[simp]
public theorem make_nil_is_empty {α β} [LT α] ... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_7 | 6b2e1ca8175fcd92 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 7 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 1 | [
{
"theorem_name": "in_list_iff_find?_some",
"depth": 1,
"n_commands": 0,
"n_lines": 20,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n unfold find?\n constructor\n case mp =>\n intro h₁\n cases h₂ : m.toList.find? λ x => match x with | (k', _... | [
{
"name": "key_maps_to_one_value",
"text": "/--\n In well-formed maps, if there are two pairs with the same key, then they have\n the same value\n-/\npublic theorem key_maps_to_one_value [DecidableEq α] [LT α] [DecidableLT α] [StrictLT α] (k : α) (v₁ v₂ : β) (m : Map α β) :\n m.WellFormed →\n (k, v₁) ∈ ... | [
{
"name": "in_list_iff_find?_some",
"fan_in": 4,
"n_deps_direct": 2,
"n_deps_transitive": 3,
"n_lines": 29,
"n_chars": 945,
"n_subproofs": 1,
"n_tactics": 21,
"cyclomatic": 4,
"n_automation": 4,
"n_rewrites": 3,
"n_structural": 6,
"automation_only": false,
"ma... | 3 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -55,6 +55,21 @@
rw [WellFormed, toList, make, h]
/--
+ In well-formed maps, if there are two pairs with the same key, then they have
+ the same value
+-/
+public theorem key_maps_to_one_value [DecidableEq α] [LT α] [DecidableLT α] [StrictLT α] (k : α) (v₁ v₂ : β) (m : Map α β) :
+ m.WellFormed →
+ (k, v₁... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_8 | ba88f728cca3c181 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 8 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 4 | [
{
"theorem_name": "in_list_iff_find?_some",
"depth": 1,
"n_commands": 0,
"n_lines": 20,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n unfold find?\n constructor\n case mp =>\n intro h₁\n cases h₂ : m.toList.find? λ x => match x with | (k', _... | [
{
"name": "find?_mem_toList",
"text": "/--\n Converse is available at `in_list_iff_find?_some` (requires `wf` though)\n\n Inverse is available at `find?_notmem_keys` (requires `wf` though)\n-/\npublic theorem find?_mem_toList {α β} [LT α] [DecidableLT α] [DecidableEq α] {m : Map α β} {k : α} {v : β}\n (h... | [
{
"name": "find?_notmem_keys",
"fan_in": 1,
"n_deps_direct": 3,
"n_deps_transitive": 6,
"n_lines": 27,
"n_chars": 1001,
"n_subproofs": 1,
"n_tactics": 31,
"cyclomatic": 9,
"n_automation": 6,
"n_rewrites": 4,
"n_structural": 6,
"automation_only": false,
"max_ne... | 6 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -210,13 +210,49 @@
simp [h_eq]
/--
+ Converse is available at `in_list_iff_find?_some` (requires `wf` though)
+
+ Inverse is available at `find?_notmem_keys` (requires `wf` though)
+-/
+public theorem find?_mem_toList {α β} [LT α] [DecidableLT α] [DecidableEq α] {m : Map α β} {k : α} {v : β}
+ (h₁ : m.fin... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_9 | c043f28d4bf35c72 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 9 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 4 | [
{
"theorem_name": "in_list_iff_find?_some",
"depth": 1,
"n_commands": 0,
"n_lines": 20,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n unfold find?\n constructor\n case mp =>\n intro h₁\n cases h₂ : m.toList.find? λ x => match x with | (k', _... | [
{
"name": "find?_mem_toList",
"text": "/--\n Converse is available at `in_list_iff_find?_some` (requires `wf` though)\n\n Inverse is available at `find?_notmem_keys` (requires `wf` though)\n-/\npublic theorem find?_mem_toList {α β} [LT α] [DecidableLT α] [DecidableEq α] {m : Map α β} {k : α} {v : β}\n (h... | [
{
"name": "find?_ext",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 6,
"n_lines": 21,
"n_chars": 680,
"n_subproofs": 2,
"n_tactics": 11,
"cyclomatic": 2,
"n_automation": 0,
"n_rewrites": 2,
"n_structural": 6,
"automation_only": false,
"max_nesting": 4... | 6 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -198,13 +198,49 @@
simp [h_eq]
/--
+ Converse is available at `in_list_iff_find?_some` (requires `wf` though)
+
+ Inverse is available at `find?_notmem_keys` (requires `wf` though)
+-/
+public theorem find?_mem_toList {α β} [LT α] [DecidableLT α] [DecidableEq α] {m : Map α β} {k : α} {v : β}
+ (h₁ : m.fin... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_10 | a90038f96f4b4cde | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 10 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 5 | [
{
"theorem_name": "find?_some_implies_contains",
"depth": 1,
"n_commands": 0,
"n_lines": 4,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intros h\n apply contains_iff_some_find?.mpr\n simp [h]",
"n_chars": 61,
"n_subproofs": 0,
"n_tac... | [
{
"name": "contains_iff_some_find?",
"text": "public theorem contains_iff_some_find? {α β} [BEq α] {m : Map α β} {k : α} :\n m.contains k ↔ ∃ v, m.find? k = .some v\n:= by simp [contains, Option.isSome_iff_exists]\n\n",
"fan_in": 5,
"n_lines": 5,
"n_chars": 178,
"n_subproofs": 0,
"n_tac... | [
{
"name": "in_list_implies_contains",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 15,
"n_chars": 373,
"n_subproofs": 1,
"n_tactics": 9,
"cyclomatic": 2,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 3,
"automation_only": false,
"m... | 2 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -117,6 +117,10 @@
(mk kvs).toList = kvs
:= by simp only [toList]
+public theorem contains_iff_some_find? {α β} [BEq α] {m : Map α β} {k : α} :
+ m.contains k ↔ ∃ v, m.find? k = .some v
+:= by simp [contains, Option.isSome_iff_exists]
+
@[simp]
public theorem not_find?_of_empty [BEq α] {k : α} :
(Map.empt... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_11 | e058aac2851d60f1 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 11 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 1 | [
{
"theorem_name": "find?_none_iff_all_absent",
"depth": 1,
"n_commands": 0,
"n_lines": 1,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " Iff.intro find?_none_all_absent all_absent_find?_none",
"n_chars": 54,
"n_subproofs": 0,
"n_tactics": 1,
... | [
{
"name": "all_absent_find?_none",
"text": "public theorem all_absent_find?_none [LT α] [DecidableLT α] [StrictLT α] [DecidableEq α] {m : Map α β} {k : α} :\n (∀ v, (k, v) ∉ m.toList) → m.find? k = none\n:= by\n cases h₁ : m.toList\n case nil =>\n simp only [toList_nil_iff_empty] at h₁\n subst m\n ... | [
{
"name": "find?_none_iff_all_absent",
"fan_in": 2,
"n_deps_direct": 2,
"n_deps_transitive": 3,
"n_lines": 6,
"n_chars": 236,
"n_subproofs": 0,
"n_tactics": 1,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,
"m... | 2 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -194,9 +194,35 @@
specialize hf (k, v) hc
simp only [not_true_eq_false] at hf
+public theorem all_absent_find?_none [LT α] [DecidableLT α] [StrictLT α] [DecidableEq α] {m : Map α β} {k : α} :
+ (∀ v, (k, v) ∉ m.toList) → m.find? k = none
+:= by
+ cases h₁ : m.toList
+ case nil =>
+ simp only [toList_ni... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_12 | 17ce4a75405f6d0b | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 12 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 2 | [
{
"theorem_name": "filterMap_key_id_key_none_implies_find?_none",
"depth": 1,
"n_commands": 0,
"n_lines": 26,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n suffices h : (Map.mk (ks.filterMap (λ k => do some (k, ←fn k)))).find? k = none from by\n ... | [
{
"name": "find?_none_iff_all_absent",
"text": "public theorem find?_none_iff_all_absent [LT α] [DecidableLT α] [StrictLT α] [DecidableEq α] {m : Map α β} {k : α} :\n m.find? k = none ↔ ∀ v, ¬ (k, v) ∈ m.toList\n:= Iff.intro find?_none_all_absent all_absent_find?_none\n\n\n",
"fan_in": 2,
"n_lines"... | [
{
"name": "filterMap_key_id_key_none_implies_find?_none",
"fan_in": 0,
"n_deps_direct": 3,
"n_deps_transitive": 6,
"n_lines": 33,
"n_chars": 1318,
"n_subproofs": 3,
"n_tactics": 26,
"cyclomatic": 4,
"n_automation": 11,
"n_rewrites": 2,
"n_structural": 7,
"automati... | 4 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -220,6 +220,10 @@
have ih := all_absent_find?_none hi₂
simpa [Map.find?, Map.toList] using ih
+public theorem find?_none_iff_all_absent [LT α] [DecidableLT α] [StrictLT α] [DecidableEq α] {m : Map α β} {k : α} :
+ m.find? k = none ↔ ∀ v, ¬ (k, v) ∈ m.toList
+:= Iff.intro find?_none_all_absent all_absent... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_13 | 14d23c2a248486b4 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 13 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 2 | [
{
"theorem_name": "filterMap_key_id_key_none_implies_find?_none",
"depth": 1,
"n_commands": 0,
"n_lines": 26,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n suffices h : (Map.mk (ks.filterMap (λ k => do some (k, ←fn k)))).find? k = none from by\n ... | [
{
"name": "find?_none_iff_all_absent",
"text": "public theorem find?_none_iff_all_absent [LT α] [DecidableLT α] [StrictLT α] [DecidableEq α] {m : Map α β} {k : α} :\n m.find? k = none ↔ ∀ v, ¬ (k, v) ∈ m.toList\n:= Iff.intro find?_none_all_absent all_absent_find?_none\n\n\n",
"fan_in": 2,
"n_lines"... | [
{
"name": "mapM_key_id_key_none_implies_find?_none",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 4,
"n_lines": 16,
"n_chars": 654,
"n_subproofs": 2,
"n_tactics": 10,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 0,
"n_structural": 2,
"automation_only... | 3 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -220,11 +220,24 @@
have ih := all_absent_find?_none hi₂
simpa [Map.find?, Map.toList] using ih
+public theorem find?_none_iff_all_absent [LT α] [DecidableLT α] [StrictLT α] [DecidableEq α] {m : Map α β} {k : α} :
+ m.find? k = none ↔ ∀ v, ¬ (k, v) ∈ m.toList
+:= Iff.intro find?_none_all_absent all_absen... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_14 | b946edda36fcf104 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 14 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 10 | [
{
"theorem_name": "wf_implies_tail_wf",
"depth": 1,
"n_commands": 0,
"n_lines": 10,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have := wf_iff_sorted.mp hwf\n cases tl with\n | nil =>\n simp [Map.WellFormed, Map.toList, make, List.canonicaliz... | [
{
"name": "wf_iff_sorted",
"text": "public theorem wf_iff_sorted {α β} [LT α] [DecidableLT α] [StrictLT α] {m : Map α β} :\n m.WellFormed ↔ m.toList.SortedBy Prod.fst\n:= by\n constructor\n case mp =>\n intro h\n rw [WellFormed, make] at h\n rw [h, toList]\n simp only [List.canonicalize_sorte... | [
{
"name": "mapOnValues_wf",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 10,
"n_chars": 318,
"n_subproofs": 0,
"n_tactics": 6,
"cyclomatic": 1,
"n_automation": 3,
"n_rewrites": 0,
"n_structural": 2,
"automation_only": false,
"max_nesting... | 1 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -39,6 +39,21 @@
public def WellFormed {α β} [LT α] [DecidableLT α] (m : Map α β) :=
m = Map.make m.toList
+public theorem wf_iff_sorted {α β} [LT α] [DecidableLT α] [StrictLT α] {m : Map α β} :
+ m.WellFormed ↔ m.toList.SortedBy Prod.fst
+:= by
+ constructor
+ case mp =>
+ intro h
+ rw [WellFormed, ma... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_15 | 2a61dbf14179fa25 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 15 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 1 | [
{
"theorem_name": "contains_mapOnValues",
"depth": 1,
"n_commands": 0,
"n_lines": 5,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [contains, Option.isSome]\n cases h : m.find? k\n · simp [(find?_mapOnValues_none f).mpr h]\n · simp [fin... | [
{
"name": "find?_mapOnValues_some",
"text": "public theorem find?_mapOnValues_some {α β γ} [LT α] [DecidableLT α] [DecidableEq α] (f : β → γ) {m : Map α β} {k : α} {v : β} :\n m.find? k = .some v →\n (m.mapOnValues f).find? k = .some (f v)\n:= by\n intro h₁\n rw [find?_mapOnValues]\n simp [Option.map, ... | [
{
"name": "contains_mapOnValues",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 3,
"n_lines": 10,
"n_chars": 349,
"n_subproofs": 0,
"n_tactics": 5,
"cyclomatic": 2,
"n_automation": 3,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": false,
"max_n... | 1 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -195,6 +195,14 @@
simp only [find?, toList, mapOnValues, ← List.find?_pair_map]
cases m.1.find? (λ x => x.fst == k) <;> simp only [Option.map_none, Option.map_some]
+public theorem find?_mapOnValues_some {α β γ} [LT α] [DecidableLT α] [DecidableEq α] (f : β → γ) {m : Map α β} {k : α} {v : β} :
+ m.find? k =... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_16 | 2b59c59d66a44f9d | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 16 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 3 | [
{
"theorem_name": "mapOnValues_congr",
"depth": 1,
"n_commands": 0,
"n_lines": 4,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [mapOnValues, mk.injEq, List.map_inj_left, Prod.mk.injEq, true_and, Prod.forall]\n intro h₁ a b h₂\n apply h₁... | [
{
"name": "in_list_in_values",
"text": "public theorem in_list_in_values {k : α} {v : β} {m : Map α β} :\n (k, v) ∈ m.toList → v ∈ m.values\n:= by\n simp only [values, List.mem_map]\n intro h₁\n exists (k, v)\n\n",
"fan_in": 3,
"n_lines": 8,
"n_chars": 181,
"n_subproofs": 0,
"n_tacti... | [
{
"name": "mapOnValues_congr",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 9,
"n_chars": 365,
"n_subproofs": 0,
"n_tactics": 4,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 2,
"automation_only": false,
"max_nesti... | 1 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -117,6 +117,13 @@
(mk kvs).toList = kvs
:= by simp only [toList]
+public theorem in_list_in_values {k : α} {v : β} {m : Map α β} :
+ (k, v) ∈ m.toList → v ∈ m.values
+:= by
+ simp only [values, List.mem_map]
+ intro h₁
+ exists (k, v)
+
public theorem contains_iff_some_find? {α β} [BEq α] {m : Map α β} {k... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_17 | 639659304a6943db | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 17 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 3 | [
{
"theorem_name": "mapOnValues_congr",
"depth": 1,
"n_commands": 0,
"n_lines": 4,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [mapOnValues, mk.injEq, List.map_inj_left, Prod.mk.injEq, true_and, Prod.forall]\n intro h₁ a b h₂\n apply h₁... | [
{
"name": "in_list_in_values",
"text": "public theorem in_list_in_values {k : α} {v : β} {m : Map α β} :\n (k, v) ∈ m.toList → v ∈ m.values\n:= by\n simp only [values, List.mem_map]\n intro h₁\n exists (k, v)\n\n",
"fan_in": 3,
"n_lines": 8,
"n_chars": 181,
"n_subproofs": 0,
"n_tacti... | [
{
"name": "mapOnValues_restricted_id",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 12,
"n_chars": 324,
"n_subproofs": 0,
"n_tactics": 8,
"cyclomatic": 2,
"n_automation": 3,
"n_rewrites": 0,
"n_structural": 4,
"automation_only": false,
"... | 1 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -117,6 +117,13 @@
(mk kvs).toList = kvs
:= by simp only [toList]
+public theorem in_list_in_values {k : α} {v : β} {m : Map α β} :
+ (k, v) ∈ m.toList → v ∈ m.values
+:= by
+ simp only [values, List.mem_map]
+ intro h₁
+ exists (k, v)
+
public theorem contains_iff_some_find? {α β} [BEq α] {m : Map α β} {k... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_18 | 811ca8aa39b96c48 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 18 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 4 | [
{
"theorem_name": "in_list_iff_find?_some",
"depth": 1,
"n_commands": 0,
"n_lines": 20,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n unfold find?\n constructor\n case mp =>\n intro h₁\n cases h₂ : m.toList.find? λ x => match x with | (k', _... | [
{
"name": "find?_mem_toList",
"text": "/--\n Converse is available at `in_list_iff_find?_some` (requires `wf` though)\n\n Inverse is available at `find?_notmem_keys` (requires `wf` though)\n-/\npublic theorem find?_mem_toList {α β} [LT α] [DecidableLT α] [DecidableEq α] {m : Map α β} {k : α} {v : β}\n (h... | [
{
"name": "findOrErr_ok_implies_in_toList",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 11,
"n_chars": 385,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": false,
... | 1 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -182,6 +182,23 @@
simpa using h_eq
simp [h_eq]
+/--
+ Converse is available at `in_list_iff_find?_some` (requires `wf` though)
+
+ Inverse is available at `find?_notmem_keys` (requires `wf` though)
+-/
+public theorem find?_mem_toList {α β} [LT α] [DecidableLT α] [DecidableEq α] {m : Map α β} {k : α}... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_19 | 05f50c2bab585a2c | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 19 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 4 | [
{
"theorem_name": "in_list_iff_find?_some",
"depth": 1,
"n_commands": 0,
"n_lines": 20,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n unfold find?\n constructor\n case mp =>\n intro h₁\n cases h₂ : m.toList.find? λ x => match x with | (k', _... | [
{
"name": "find?_mem_toList",
"text": "/--\n Converse is available at `in_list_iff_find?_some` (requires `wf` though)\n\n Inverse is available at `find?_notmem_keys` (requires `wf` though)\n-/\npublic theorem find?_mem_toList {α β} [LT α] [DecidableLT α] [DecidableEq α] {m : Map α β} {k : α} {v : β}\n (h... | [
{
"name": "findOrErr_ok_iff_in_toList",
"fan_in": 0,
"n_deps_direct": 3,
"n_deps_transitive": 6,
"n_lines": 15,
"n_chars": 542,
"n_subproofs": 0,
"n_tactics": 6,
"cyclomatic": 2,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 3,
"automation_only": false,
... | 5 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -198,13 +198,49 @@
simp [h_eq]
/--
+ Converse is available at `in_list_iff_find?_some` (requires `wf` though)
+
+ Inverse is available at `find?_notmem_keys` (requires `wf` though)
+-/
+public theorem find?_mem_toList {α β} [LT α] [DecidableLT α] [DecidableEq α] {m : Map α β} {k : α} {v : β}
+ (h₁ : m.fin... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_20 | 084b441c106346fb | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 20 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 4 | [
{
"theorem_name": "in_list_iff_find?_some",
"depth": 1,
"n_commands": 0,
"n_lines": 20,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n unfold find?\n constructor\n case mp =>\n intro h₁\n cases h₂ : m.toList.find? λ x => match x with | (k', _... | [
{
"name": "find?_mem_toList",
"text": "/--\n Converse is available at `in_list_iff_find?_some` (requires `wf` though)\n\n Inverse is available at `find?_notmem_keys` (requires `wf` though)\n-/\npublic theorem find?_mem_toList {α β} [LT α] [DecidableLT α] [DecidableEq α] {m : Map α β} {k : α} {v : β}\n (h... | [
{
"name": "find?_some_implies_in_values",
"fan_in": 2,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 13,
"n_chars": 349,
"n_subproofs": 0,
"n_tactics": 5,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 3,
"automation_only": false,
... | 1 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -182,6 +182,23 @@
simpa using h_eq
simp [h_eq]
+/--
+ Converse is available at `in_list_iff_find?_some` (requires `wf` though)
+
+ Inverse is available at `find?_notmem_keys` (requires `wf` though)
+-/
+public theorem find?_mem_toList {α β} [LT α] [DecidableLT α] [DecidableEq α] {m : Map α β} {k : α}... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_21 | 7fdb1a59d348a288 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 21 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 2 | [
{
"theorem_name": "findOrErr_ok_implies_in_values",
"depth": 1,
"n_commands": 0,
"n_lines": 3,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [findOrErr_ok_iff_find?_some]\n exact find?_some_implies_in_values",
"n_chars": 82,
"n_su... | [
{
"name": "find?_some_implies_in_values",
"text": "/--\n The converse requires the `wf` precondition, and is available in\n `find?_some_iff_in_values` below\n-/\npublic theorem find?_some_implies_in_values [LT α] [DecidableLT α] [DecidableEq α] {m : Map α β} {k : α} {v : β} :\n m.find? k = .some v → v ∈ ... | [
{
"name": "findOrErr_ok_implies_in_values",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 3,
"n_lines": 11,
"n_chars": 378,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": false,
... | 2 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -289,11 +289,25 @@
/--
The converse requires the `wf` precondition, and is available in
+ `find?_some_iff_in_values` below
+-/
+public theorem find?_some_implies_in_values [LT α] [DecidableLT α] [DecidableEq α] {m : Map α β} {k : α} {v : β} :
+ m.find? k = .some v → v ∈ m.values
+:= by
+ intro h₁
+ simp [v... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_22 | d4e3c2e176560d91 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 22 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 4 | [
{
"theorem_name": "in_list_iff_find?_some",
"depth": 1,
"n_commands": 0,
"n_lines": 20,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n unfold find?\n constructor\n case mp =>\n intro h₁\n cases h₂ : m.toList.find? λ x => match x with | (k', _... | [
{
"name": "find?_mem_toList",
"text": "/--\n Converse is available at `in_list_iff_find?_some` (requires `wf` though)\n\n Inverse is available at `find?_notmem_keys` (requires `wf` though)\n-/\npublic theorem find?_mem_toList {α β} [LT α] [DecidableLT α] [DecidableEq α] {m : Map α β} {k : α} {v : β}\n (h... | [
{
"name": "find?_some_iff_in_values",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 5,
"n_lines": 22,
"n_chars": 666,
"n_subproofs": 0,
"n_tactics": 13,
"cyclomatic": 2,
"n_automation": 3,
"n_rewrites": 1,
"n_structural": 5,
"automation_only": false,
"... | 5 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -198,13 +198,49 @@
simp [h_eq]
/--
+ Converse is available at `in_list_iff_find?_some` (requires `wf` though)
+
+ Inverse is available at `find?_notmem_keys` (requires `wf` though)
+-/
+public theorem find?_mem_toList {α β} [LT α] [DecidableLT α] [DecidableEq α] {m : Map α β} {k : α} {v : β}
+ (h₁ : m.fin... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_23 | 07b31a4afb150996 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 23 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 4 | [
{
"theorem_name": "in_list_iff_find?_some",
"depth": 1,
"n_commands": 0,
"n_lines": 20,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n unfold find?\n constructor\n case mp =>\n intro h₁\n cases h₂ : m.toList.find? λ x => match x with | (k', _... | [
{
"name": "find?_mem_toList",
"text": "/--\n Converse is available at `in_list_iff_find?_some` (requires `wf` though)\n\n Inverse is available at `find?_notmem_keys` (requires `wf` though)\n-/\npublic theorem find?_mem_toList {α β} [LT α] [DecidableLT α] [DecidableEq α] {m : Map α β} {k : α} {v : β}\n (h... | [
{
"name": "findOrErr_ok_iff_in_values",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 7,
"n_lines": 12,
"n_chars": 452,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": false,
... | 6 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -198,13 +198,49 @@
simp [h_eq]
/--
+ Converse is available at `in_list_iff_find?_some` (requires `wf` though)
+
+ Inverse is available at `find?_notmem_keys` (requires `wf` though)
+-/
+public theorem find?_mem_toList {α β} [LT α] [DecidableLT α] [DecidableEq α] {m : Map α β} {k : α} {v : β}
+ (h₁ : m.fin... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_24 | dd4cc0f03765f410 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 24 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 4 | [
{
"theorem_name": "in_list_iff_find?_some",
"depth": 1,
"n_commands": 0,
"n_lines": 20,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n unfold find?\n constructor\n case mp =>\n intro h₁\n cases h₂ : m.toList.find? λ x => match x with | (k', _... | [
{
"name": "find?_mem_toList",
"text": "/--\n Converse is available at `in_list_iff_find?_some` (requires `wf` though)\n\n Inverse is available at `find?_notmem_keys` (requires `wf` though)\n-/\npublic theorem find?_mem_toList {α β} [LT α] [DecidableLT α] [DecidableEq α] {m : Map α β} {k : α} {v : β}\n (h... | [
{
"name": "findOrErr_err_iff_not_in_keys",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 8,
"n_lines": 8,
"n_chars": 282,
"n_subproofs": 0,
"n_tactics": 3,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": false,
... | 7 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -210,13 +210,49 @@
simp [h_eq]
/--
+ Converse is available at `in_list_iff_find?_some` (requires `wf` though)
+
+ Inverse is available at `find?_notmem_keys` (requires `wf` though)
+-/
+public theorem find?_mem_toList {α β} [LT α] [DecidableLT α] [DecidableEq α] {m : Map α β} {k : α} {v : β}
+ (h₁ : m.fin... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_25 | 791a661fba1ed7d9 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 25 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 10 | [
{
"theorem_name": "wf_implies_tail_wf",
"depth": 1,
"n_commands": 0,
"n_lines": 10,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have := wf_iff_sorted.mp hwf\n cases tl with\n | nil =>\n simp [Map.WellFormed, Map.toList, make, List.canonicaliz... | [
{
"name": "wf_iff_sorted",
"text": "public theorem wf_iff_sorted {α β} [LT α] [DecidableLT α] [StrictLT α] {m : Map α β} :\n m.WellFormed ↔ m.toList.SortedBy Prod.fst\n:= by\n constructor\n case mp =>\n intro h\n rw [WellFormed, make] at h\n rw [h, toList]\n simp only [List.canonicalize_sorte... | [
{
"name": "mapMOnValues_some_wf",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 3,
"n_lines": 11,
"n_chars": 375,
"n_subproofs": 1,
"n_tactics": 5,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 2,
"automation_only": false,
"max_n... | 2 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -39,6 +39,21 @@
public def WellFormed {α β} [LT α] [DecidableLT α] (m : Map α β) :=
m = Map.make m.toList
+public theorem wf_iff_sorted {α β} [LT α] [DecidableLT α] [StrictLT α] {m : Map α β} :
+ m.WellFormed ↔ m.toList.SortedBy Prod.fst
+:= by
+ constructor
+ case mp =>
+ intro h
+ rw [WellFormed, ma... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_26 | b3b549cea607e041 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 26 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 10 | [
{
"theorem_name": "wf_implies_tail_wf",
"depth": 1,
"n_commands": 0,
"n_lines": 10,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have := wf_iff_sorted.mp hwf\n cases tl with\n | nil =>\n simp [Map.WellFormed, Map.toList, make, List.canonicaliz... | [
{
"name": "wf_iff_sorted",
"text": "public theorem wf_iff_sorted {α β} [LT α] [DecidableLT α] [StrictLT α] {m : Map α β} :\n m.WellFormed ↔ m.toList.SortedBy Prod.fst\n:= by\n constructor\n case mp =>\n intro h\n rw [WellFormed, make] at h\n rw [h, toList]\n simp only [List.canonicalize_sorte... | [
{
"name": "mapMOnValues_some_wf_alt_proof",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 25,
"n_chars": 776,
"n_subproofs": 0,
"n_tactics": 15,
"cyclomatic": 3,
"n_automation": 5,
"n_rewrites": 2,
"n_structural": 5,
"automation_only": false,... | 1 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -39,6 +39,21 @@
public def WellFormed {α β} [LT α] [DecidableLT α] (m : Map α β) :=
m = Map.make m.toList
+public theorem wf_iff_sorted {α β} [LT α] [DecidableLT α] [StrictLT α] {m : Map α β} :
+ m.WellFormed ↔ m.toList.SortedBy Prod.fst
+:= by
+ constructor
+ case mp =>
+ intro h
+ rw [WellFormed, ma... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_27 | 26ed0db54b707ed2 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 27 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 10 | [
{
"theorem_name": "wf_implies_tail_wf",
"depth": 1,
"n_commands": 0,
"n_lines": 10,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have := wf_iff_sorted.mp hwf\n cases tl with\n | nil =>\n simp [Map.WellFormed, Map.toList, make, List.canonicaliz... | [
{
"name": "wf_iff_sorted",
"text": "public theorem wf_iff_sorted {α β} [LT α] [DecidableLT α] [StrictLT α] {m : Map α β} :\n m.WellFormed ↔ m.toList.SortedBy Prod.fst\n:= by\n constructor\n case mp =>\n intro h\n rw [WellFormed, make] at h\n rw [h, toList]\n simp only [List.canonicalize_sorte... | [
{
"name": "mapMOnValues_ok_wf",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 22,
"n_chars": 700,
"n_subproofs": 0,
"n_tactics": 19,
"cyclomatic": 5,
"n_automation": 6,
"n_rewrites": 2,
"n_structural": 6,
"automation_only": false,
"max_ne... | 1 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -39,6 +39,21 @@
public def WellFormed {α β} [LT α] [DecidableLT α] (m : Map α β) :=
m = Map.make m.toList
+public theorem wf_iff_sorted {α β} [LT α] [DecidableLT α] [StrictLT α] {m : Map α β} :
+ m.WellFormed ↔ m.toList.SortedBy Prod.fst
+:= by
+ constructor
+ case mp =>
+ intro h
+ rw [WellFormed, ma... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_28 | 8fcf5dba7aa43000 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 28 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 2 | [
{
"theorem_name": "mapMOnValues_some_implies_all_some",
"depth": 1,
"n_commands": 0,
"n_lines": 8,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro h₁\n replace h₁ := List.forall₂_implies_all_left (mapMOnValues_some_implies_forall₂ h₁)\n intro ... | [
{
"name": "mapMOnValues_some_implies_forall₂",
"text": "theorem mapMOnValues_some_implies_forall₂ [LT α] [DecidableLT α] {f : β → Option γ} {m₁ : Map α β} {m₂ : Map α γ} :\n m₁.mapMOnValues f = some m₂ →\n List.Forall₂ (λ kv₁ kv₂ => kv₁.fst = kv₂.fst ∧ f kv₁.snd = some kv₂.snd) m₁.toList m₂.toList\n:= by\... | [
{
"name": "mapMOnValues_some_implies_all_some",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 13,
"n_chars": 509,
"n_subproofs": 0,
"n_tactics": 8,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 3,
"automation_only": fal... | 1 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -285,10 +285,35 @@
rw [List.mapM_map]
rfl
+theorem mapMOnValues_some_implies_forall₂ [LT α] [DecidableLT α] {f : β → Option γ} {m₁ : Map α β} {m₂ : Map α γ} :
+ m₁.mapMOnValues f = some m₂ →
+ List.Forall₂ (λ kv₁ kv₂ => kv₁.fst = kv₂.fst ∧ f kv₁.snd = some kv₂.snd) m₁.toList m₂.toList
+:= by
+ unfold mapM... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_29 | 98f09f2587bd7f1d | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 29 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 2 | [
{
"theorem_name": "mapMOnValues_some_implies_all_some",
"depth": 1,
"n_commands": 0,
"n_lines": 8,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro h₁\n replace h₁ := List.forall₂_implies_all_left (mapMOnValues_some_implies_forall₂ h₁)\n intro ... | [
{
"name": "mapMOnValues_some_implies_forall₂",
"text": "theorem mapMOnValues_some_implies_forall₂ [LT α] [DecidableLT α] {f : β → Option γ} {m₁ : Map α β} {m₂ : Map α γ} :\n m₁.mapMOnValues f = some m₂ →\n List.Forall₂ (λ kv₁ kv₂ => kv₁.fst = kv₂.fst ∧ f kv₁.snd = some kv₂.snd) m₁.toList m₂.toList\n:= by\... | [
{
"name": "mapMOnValues_some_implies_all_from_some",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 13,
"n_chars": 496,
"n_subproofs": 0,
"n_tactics": 8,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 3,
"automation_only"... | 1 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -285,10 +285,35 @@
rw [List.mapM_map]
rfl
+theorem mapMOnValues_some_implies_forall₂ [LT α] [DecidableLT α] {f : β → Option γ} {m₁ : Map α β} {m₂ : Map α γ} :
+ m₁.mapMOnValues f = some m₂ →
+ List.Forall₂ (λ kv₁ kv₂ => kv₁.fst = kv₂.fst ∧ f kv₁.snd = some kv₂.snd) m₁.toList m₂.toList
+:= by
+ unfold mapM... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_30 | c21b0a9fbb16cf64 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 30 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 2 | [
{
"theorem_name": "mapMOnValues_some_implies_all_some",
"depth": 1,
"n_commands": 0,
"n_lines": 8,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro h₁\n replace h₁ := List.forall₂_implies_all_left (mapMOnValues_some_implies_forall₂ h₁)\n intro ... | [
{
"name": "mapMOnValues_some_implies_forall₂",
"text": "theorem mapMOnValues_some_implies_forall₂ [LT α] [DecidableLT α] {f : β → Option γ} {m₁ : Map α β} {m₂ : Map α γ} :\n m₁.mapMOnValues f = some m₂ →\n List.Forall₂ (λ kv₁ kv₂ => kv₁.fst = kv₂.fst ∧ f kv₁.snd = some kv₂.snd) m₁.toList m₂.toList\n:= by\... | [
{
"name": "mapMOnValues_none_iff_exists_none",
"fan_in": 0,
"n_deps_direct": 5,
"n_deps_transitive": 7,
"n_lines": 47,
"n_chars": 1824,
"n_subproofs": 3,
"n_tactics": 49,
"cyclomatic": 6,
"n_automation": 9,
"n_rewrites": 6,
"n_structural": 11,
"automation_only": f... | 5 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -336,10 +336,35 @@
subst mtl'
simp [h₃]
+theorem mapMOnValues_some_implies_forall₂ [LT α] [DecidableLT α] {f : β → Option γ} {m₁ : Map α β} {m₂ : Map α γ} :
+ m₁.mapMOnValues f = some m₂ →
+ List.Forall₂ (λ kv₁ kv₂ => kv₁.fst = kv₂.fst ∧ f kv₁.snd = some kv₂.snd) m₁.toList m₂.toList
+:= by
+ unfol... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_31 | 5474e49b507e2e8b | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 31 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 3 | [
{
"theorem_name": "mapOnValues_congr",
"depth": 1,
"n_commands": 0,
"n_lines": 4,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [mapOnValues, mk.injEq, List.map_inj_left, Prod.mk.injEq, true_and, Prod.forall]\n intro h₁ a b h₂\n apply h₁... | [
{
"name": "in_list_in_values",
"text": "public theorem in_list_in_values {k : α} {v : β} {m : Map α β} :\n (k, v) ∈ m.toList → v ∈ m.values\n:= by\n simp only [values, List.mem_map]\n intro h₁\n exists (k, v)\n\n",
"fan_in": 3,
"n_lines": 8,
"n_chars": 181,
"n_subproofs": 0,
"n_tacti... | [
{
"name": "mapMOnValues_error_implies_exists_error",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 12,
"n_chars": 447,
"n_subproofs": 1,
"n_tactics": 8,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 2,
"n_structural": 2,
"automation_only"... | 1 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -117,6 +117,13 @@
(mk kvs).toList = kvs
:= by simp only [toList]
+public theorem in_list_in_values {k : α} {v : β} {m : Map α β} :
+ (k, v) ∈ m.toList → v ∈ m.values
+:= by
+ simp only [values, List.mem_map]
+ intro h₁
+ exists (k, v)
+
public theorem contains_iff_some_find? {α β} [BEq α] {m : Map α β} {k... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_32 | e4c716369175b8af | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 32 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 10 | [
{
"theorem_name": "wf_implies_tail_wf",
"depth": 1,
"n_commands": 0,
"n_lines": 10,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have := wf_iff_sorted.mp hwf\n cases tl with\n | nil =>\n simp [Map.WellFormed, Map.toList, make, List.canonicaliz... | [
{
"name": "wf_iff_sorted",
"text": "public theorem wf_iff_sorted {α β} [LT α] [DecidableLT α] [StrictLT α] {m : Map α β} :\n m.WellFormed ↔ m.toList.SortedBy Prod.fst\n:= by\n constructor\n case mp =>\n intro h\n rw [WellFormed, make] at h\n rw [h, toList]\n simp only [List.canonicalize_sorte... | [
{
"name": "wellFormed_correct",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 15,
"n_chars": 342,
"n_subproofs": 0,
"n_tactics": 10,
"cyclomatic": 2,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 9,
"automation_only": false,
"max_ne... | 1 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -39,6 +39,21 @@
public def WellFormed {α β} [LT α] [DecidableLT α] (m : Map α β) :=
m = Map.make m.toList
+public theorem wf_iff_sorted {α β} [LT α] [DecidableLT α] [StrictLT α] {m : Map α β} :
+ m.WellFormed ↔ m.toList.SortedBy Prod.fst
+:= by
+ constructor
+ case mp =>
+ intro h
+ rw [WellFormed, ma... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_33 | 1fd0a98ef14ff794 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 33 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 1 | [
{
"theorem_name": "make_find?_eq_list_find?",
"depth": 1,
"n_commands": 0,
"n_lines": 16,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n cases l\n case nil =>\n simp [make, List.canonicalize, Map.find?, List.find?]\n case cons hd tl =>\n simp... | [
{
"name": "map_make_find?_in_tail",
"text": "/--\nHelper for make_find?_eq_list_find?\n-/\nprivate theorem map_make_find?_in_tail\n [LT α] [StrictLT α] [BEq α] [LawfulBEq α]\n [DecidableLT α]\n [SizeOf α] [SizeOf β]\n {hd : (α × β)} {tl : List (α × β)} {k : α} :\n ¬(hd.1 = k) →\n (Map.make (hd :: tl))... | [
{
"name": "make_find?_eq_list_find?",
"fan_in": 4,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 25,
"n_chars": 685,
"n_subproofs": 0,
"n_tactics": 16,
"cyclomatic": 3,
"n_automation": 5,
"n_rewrites": 4,
"n_structural": 1,
"automation_only": false,
"... | 1 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -285,13 +285,95 @@
rw [List.mapM_map]
rfl
+/--
+Helper for make_find?_eq_list_find?
+-/
+private theorem map_make_find?_in_tail
+ [LT α] [StrictLT α] [BEq α] [LawfulBEq α]
+ [DecidableLT α]
+ [SizeOf α] [SizeOf β]
+ {hd : (α × β)} {tl : List (α × β)} {k : α} :
+ ¬(hd.1 = k) →
+ (Map.make (hd :: tl)).fi... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_34 | 564573dd7b063407 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 34 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 4 | [
{
"theorem_name": "list_find?_iff_make_find?",
"depth": 1,
"n_commands": 0,
"n_lines": 14,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rw [make_find?_eq_list_find?]\n simp\n constructor\n case mp =>\n intro h\n exists k\n case mpr =>\n ... | [
{
"name": "make_find?_eq_list_find?",
"text": "public theorem make_find?_eq_list_find?\n [DecidableEq α] [LT α] [DecidableLT α]\n [Cedar.Data.StrictLT α]\n {l : List (α × β)}\n {k : α} :\n (make l).find? k = (List.find? (λ x => x.fst == k) l).map Prod.snd\n := by\n cases l\n case nil =>\n simp [... | [
{
"name": "list_find?_iff_make_find?",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 3,
"n_lines": 22,
"n_chars": 478,
"n_subproofs": 1,
"n_tactics": 14,
"cyclomatic": 2,
"n_automation": 2,
"n_rewrites": 2,
"n_structural": 5,
"automation_only": false,
... | 2 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -352,20 +352,66 @@
have h₈ : (hd.fst == k) = false := by simp [h₁]
rw [h₈]
+public theorem make_find?_eq_list_find?
+ [DecidableEq α] [LT α] [DecidableLT α]
+ [Cedar.Data.StrictLT α]
+ {l : List (α × β)}
+ {k : α} :
+ (make l).find? k = (List.find? (λ x => x.fst == k) l).map Prod.snd
+ := ... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_35 | 3763fae290d0c32d | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 35 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 4 | [
{
"theorem_name": "list_find?_iff_make_find?",
"depth": 1,
"n_commands": 0,
"n_lines": 14,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rw [make_find?_eq_list_find?]\n simp\n constructor\n case mp =>\n intro h\n exists k\n case mpr =>\n ... | [
{
"name": "make_find?_eq_list_find?",
"text": "public theorem make_find?_eq_list_find?\n [DecidableEq α] [LT α] [DecidableLT α]\n [Cedar.Data.StrictLT α]\n {l : List (α × β)}\n {k : α} :\n (make l).find? k = (List.find? (λ x => x.fst == k) l).map Prod.snd\n := by\n cases l\n case nil =>\n simp [... | [
{
"name": "map_make_append_find_disjoint",
"fan_in": 1,
"n_deps_direct": 4,
"n_deps_transitive": 6,
"n_lines": 45,
"n_chars": 1311,
"n_subproofs": 6,
"n_tactics": 30,
"cyclomatic": 3,
"n_automation": 5,
"n_rewrites": 3,
"n_structural": 6,
"automation_only": false,... | 4 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -374,6 +374,29 @@
have h₈ : (hd.fst == k) = false := by simp [h₁]
rw [h₈]
+public theorem make_find?_eq_list_find?
+ [DecidableEq α] [LT α] [DecidableLT α]
+ [Cedar.Data.StrictLT α]
+ {l : List (α × β)}
+ {k : α} :
+ (make l).find? k = (List.find? (λ x => x.fst == k) l).map Prod.snd
+ := b... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_36 | 565c983843edcf70 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 36 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 4 | [
{
"theorem_name": "list_find?_iff_make_find?",
"depth": 1,
"n_commands": 0,
"n_lines": 14,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rw [make_find?_eq_list_find?]\n simp\n constructor\n case mp =>\n intro h\n exists k\n case mpr =>\n ... | [
{
"name": "make_find?_eq_list_find?",
"text": "public theorem make_find?_eq_list_find?\n [DecidableEq α] [LT α] [DecidableLT α]\n [Cedar.Data.StrictLT α]\n {l : List (α × β)}\n {k : α} :\n (make l).find? k = (List.find? (λ x => x.fst == k) l).map Prod.snd\n := by\n cases l\n case nil =>\n simp [... | [
{
"name": "make_map_values_find",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 3,
"n_lines": 20,
"n_chars": 431,
"n_subproofs": 0,
"n_tactics": 9,
"cyclomatic": 1,
"n_automation": 3,
"n_rewrites": 3,
"n_structural": 2,
"automation_only": false,
"max_n... | 2 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -352,6 +352,29 @@
have h₈ : (hd.fst == k) = false := by simp [h₁]
rw [h₈]
+public theorem make_find?_eq_list_find?
+ [DecidableEq α] [LT α] [DecidableLT α]
+ [Cedar.Data.StrictLT α]
+ {l : List (α × β)}
+ {k : α} :
+ (make l).find? k = (List.find? (λ x => x.fst == k) l).map Prod.snd
+ := b... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_37 | 10d4e4ff1af884bb | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 37 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 4 | [
{
"theorem_name": "list_find?_iff_make_find?",
"depth": 1,
"n_commands": 0,
"n_lines": 14,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rw [make_find?_eq_list_find?]\n simp\n constructor\n case mp =>\n intro h\n exists k\n case mpr =>\n ... | [
{
"name": "make_find?_eq_list_find?",
"text": "public theorem make_find?_eq_list_find?\n [DecidableEq α] [LT α] [DecidableLT α]\n [Cedar.Data.StrictLT α]\n {l : List (α × β)}\n {k : α} :\n (make l).find? k = (List.find? (λ x => x.fst == k) l).map Prod.snd\n := by\n cases l\n case nil =>\n simp [... | [
{
"name": "map_make_append_find_disjoint'",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 7,
"n_lines": 19,
"n_chars": 874,
"n_subproofs": 4,
"n_tactics": 8,
"cyclomatic": 1,
"n_automation": 3,
"n_rewrites": 0,
"n_structural": 0,
"automation_only": false,
... | 5 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -374,6 +374,29 @@
have h₈ : (hd.fst == k) = false := by simp [h₁]
rw [h₈]
+public theorem make_find?_eq_list_find?
+ [DecidableEq α] [LT α] [DecidableLT α]
+ [Cedar.Data.StrictLT α]
+ {l : List (α × β)}
+ {k : α} :
+ (make l).find? k = (List.find? (λ x => x.fst == k) l).map Prod.snd
+ := b... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_38 | a10a1e62617cc9b2 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 38 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 1 | [
{
"theorem_name": "map_find?_implies_find?_weaker_pred",
"depth": 1,
"n_commands": 0,
"n_lines": 21,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n replace hfind := map_find?_to_list_find? hfind\n cases m with | mk m =>\n simp only [toList_mk_id] a... | [
{
"name": "map_find?_to_list_find?",
"text": "public theorem map_find?_to_list_find?\n [BEq α] [LawfulBEq α]\n {m : Map α β} {k : α} {v : β}\n (hfind : Map.find? m k = .some v) :\n List.find? (λ x => x.fst == k) (Map.toList m) = .some (k, v)\n:= by\n simp only [Map.find?] at hfind\n split at hfind\n ... | [
{
"name": "map_find?_implies_find?_weaker_pred",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 30,
"n_chars": 857,
"n_subproofs": 1,
"n_tactics": 21,
"cyclomatic": 5,
"n_automation": 8,
"n_rewrites": 0,
"n_structural": 4,
"automation_only": f... | 1 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -375,6 +375,22 @@
rw [map_make_find?_in_tail h₃]
rw [make_find?_eq_list_find?]
+public theorem map_find?_to_list_find?
+ [BEq α] [LawfulBEq α]
+ {m : Map α β} {k : α} {v : β}
+ (hfind : Map.find? m k = .some v) :
+ List.find? (λ x => x.fst == k) (Map.toList m) = .some (k, v)
+:= by
+ simp only [... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_39 | a8da1924e41d6f52 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 39 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 2 | [
{
"theorem_name": "eq_iff_toList_equiv",
"depth": 1,
"n_commands": 0,
"n_lines": 11,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n constructor\n case mp =>\n intro h₁\n simp [wf_iff_sorted, toList] at wf₁ wf₂\n have h₂ := List.sortedBy_equ... | [
{
"name": "eq_iff_toList_eq",
"text": "/--\n If two maps have exactly equal (k,v) sets, then the maps are equal\n\n This doesn't require WellFormed, but we use it in the proof of\n `eq_iff_toList_equiv` below\n-/\n@[simp]\npublic theorem eq_iff_toList_eq {m₁ m₂ : Map α β} :\n m₁.toList = m₂.toList ↔ m₁ ... | [
{
"name": "toList_congr",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 9,
"n_chars": 196,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": false,
"max_nesting": ... | 1 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -55,6 +55,20 @@
rw [WellFormed, toList, make, h]
/--
+ If two maps have exactly equal (k,v) sets, then the maps are equal
+
+ This doesn't require WellFormed, but we use it in the proof of
+ `eq_iff_toList_equiv` below
+-/
+@[simp]
+public theorem eq_iff_toList_eq {m₁ m₂ : Map α β} :
+ m₁.toList = m₂.toL... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_40 | 66112c469eb91021 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 40 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 4 | [
{
"theorem_name": "list_find?_iff_make_find?",
"depth": 1,
"n_commands": 0,
"n_lines": 14,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rw [make_find?_eq_list_find?]\n simp\n constructor\n case mp =>\n intro h\n exists k\n case mpr =>\n ... | [
{
"name": "make_find?_eq_list_find?",
"text": "public theorem make_find?_eq_list_find?\n [DecidableEq α] [LT α] [DecidableLT α]\n [Cedar.Data.StrictLT α]\n {l : List (α × β)}\n {k : α} :\n (make l).find? k = (List.find? (λ x => x.fst == k) l).map Prod.snd\n := by\n cases l\n case nil =>\n simp [... | [
{
"name": "find?_append",
"fan_in": 4,
"n_deps_direct": 1,
"n_deps_transitive": 3,
"n_lines": 18,
"n_chars": 558,
"n_subproofs": 1,
"n_tactics": 12,
"cyclomatic": 4,
"n_automation": 5,
"n_rewrites": 3,
"n_structural": 2,
"automation_only": false,
"max_nesting"... | 2 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -352,12 +352,45 @@
have h₈ : (hd.fst == k) = false := by simp [h₁]
rw [h₈]
+public theorem make_find?_eq_list_find?
+ [DecidableEq α] [LT α] [DecidableLT α]
+ [Cedar.Data.StrictLT α]
+ {l : List (α × β)}
+ {k : α} :
+ (make l).find? k = (List.find? (λ x => x.fst == k) l).map Prod.snd
+ := ... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_41 | 096616597bbe0a97 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 41 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 4 | [
{
"theorem_name": "list_find?_iff_make_find?",
"depth": 1,
"n_commands": 0,
"n_lines": 14,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rw [make_find?_eq_list_find?]\n simp\n constructor\n case mp =>\n intro h\n exists k\n case mpr =>\n ... | [
{
"name": "make_find?_eq_list_find?",
"text": "public theorem make_find?_eq_list_find?\n [DecidableEq α] [LT α] [DecidableLT α]\n [Cedar.Data.StrictLT α]\n {l : List (α × β)}\n {k : α} :\n (make l).find? k = (List.find? (λ x => x.fst == k) l).map Prod.snd\n := by\n cases l\n case nil =>\n simp [... | [
{
"name": "find?_append_right",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 4,
"n_lines": 12,
"n_chars": 334,
"n_subproofs": 0,
"n_tactics": 6,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 1,
"n_structural": 1,
"automation_only": false,
"max_nes... | 2 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -352,12 +352,45 @@
have h₈ : (hd.fst == k) = false := by simp [h₁]
rw [h₈]
+public theorem make_find?_eq_list_find?
+ [DecidableEq α] [LT α] [DecidableLT α]
+ [Cedar.Data.StrictLT α]
+ {l : List (α × β)}
+ {k : α} :
+ (make l).find? k = (List.find? (λ x => x.fst == k) l).map Prod.snd
+ := ... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_42 | 8452295af2686095 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 42 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 4 | [
{
"theorem_name": "list_find?_iff_make_find?",
"depth": 1,
"n_commands": 0,
"n_lines": 14,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n rw [make_find?_eq_list_find?]\n simp\n constructor\n case mp =>\n intro h\n exists k\n case mpr =>\n ... | [
{
"name": "make_find?_eq_list_find?",
"text": "public theorem make_find?_eq_list_find?\n [DecidableEq α] [LT α] [DecidableLT α]\n [Cedar.Data.StrictLT α]\n {l : List (α × β)}\n {k : α} :\n (make l).find? k = (List.find? (λ x => x.fst == k) l).map Prod.snd\n := by\n cases l\n case nil =>\n simp [... | [
{
"name": "find?_append_left",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 4,
"n_lines": 12,
"n_chars": 333,
"n_subproofs": 0,
"n_tactics": 6,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 1,
"n_structural": 1,
"automation_only": false,
"max_nest... | 2 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -352,12 +352,45 @@
have h₈ : (hd.fst == k) = false := by simp [h₁]
rw [h₈]
+public theorem make_find?_eq_list_find?
+ [DecidableEq α] [LT α] [DecidableLT α]
+ [Cedar.Data.StrictLT α]
+ {l : List (α × β)}
+ {k : α} :
+ (make l).find? k = (List.find? (λ x => x.fst == k) l).map Prod.snd
+ := ... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_43 | 64794b3092d2293b | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 43 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 10 | [
{
"theorem_name": "wf_implies_tail_wf",
"depth": 1,
"n_commands": 0,
"n_lines": 10,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have := wf_iff_sorted.mp hwf\n cases tl with\n | nil =>\n simp [Map.WellFormed, Map.toList, make, List.canonicaliz... | [
{
"name": "wf_iff_sorted",
"text": "public theorem wf_iff_sorted {α β} [LT α] [DecidableLT α] [StrictLT α] {m : Map α β} :\n m.WellFormed ↔ m.toList.SortedBy Prod.fst\n:= by\n constructor\n case mp =>\n intro h\n rw [WellFormed, make] at h\n rw [h, toList]\n simp only [List.canonicalize_sorte... | [
{
"name": "find?_filter_iff_find",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 22,
"n_chars": 801,
"n_subproofs": 3,
"n_tactics": 18,
"cyclomatic": 5,
"n_automation": 4,
"n_rewrites": 2,
"n_structural": 4,
"automation_only": false,
"max... | 2 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -39,6 +39,21 @@
public def WellFormed {α β} [LT α] [DecidableLT α] (m : Map α β) :=
m = Map.make m.toList
+public theorem wf_iff_sorted {α β} [LT α] [DecidableLT α] [StrictLT α] {m : Map α β} :
+ m.WellFormed ↔ m.toList.SortedBy Prod.fst
+:= by
+ constructor
+ case mp =>
+ intro h
+ rw [WellFormed, ma... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_44 | 2f47e497799a7b7b | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 44 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 5 | [
{
"theorem_name": "find?_some_implies_contains",
"depth": 1,
"n_commands": 0,
"n_lines": 4,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intros h\n apply contains_iff_some_find?.mpr\n simp [h]",
"n_chars": 61,
"n_subproofs": 0,
"n_tac... | [
{
"name": "contains_iff_some_find?",
"text": "public theorem contains_iff_some_find? {α β} [BEq α] {m : Map α β} {k : α} :\n m.contains k ↔ ∃ v, m.find? k = .some v\n:= by simp [contains, Option.isSome_iff_exists]\n\n",
"fan_in": 5,
"n_lines": 5,
"n_chars": 178,
"n_subproofs": 0,
"n_tac... | [
{
"name": "filter_contains_if_find_matching",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 10,
"n_chars": 358,
"n_subproofs": 0,
"n_tactics": 5,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 1,
"n_structural": 3,
"automation_only": false... | 2 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -117,6 +117,10 @@
(mk kvs).toList = kvs
:= by simp only [toList]
+public theorem contains_iff_some_find? {α β} [BEq α] {m : Map α β} {k : α} :
+ m.contains k ↔ ∃ v, m.find? k = .some v
+:= by simp [contains, Option.isSome_iff_exists]
+
@[simp]
public theorem not_find?_of_empty [BEq α] {k : α} :
(Map.empt... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_0661ad59c930_45 | 6a3b87d42be298af | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/Map.lean | Map | 45 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 34 | 5 | [
{
"theorem_name": "find?_some_implies_contains",
"depth": 1,
"n_commands": 0,
"n_lines": 4,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intros h\n apply contains_iff_some_find?.mpr\n simp [h]",
"n_chars": 61,
"n_subproofs": 0,
"n_tac... | [
{
"name": "contains_iff_some_find?",
"text": "public theorem contains_iff_some_find? {α β} [BEq α] {m : Map α β} {k : α} :\n m.contains k ↔ ∃ v, m.find? k = .some v\n:= by simp [contains, Option.isSome_iff_exists]\n\n",
"fan_in": 5,
"n_lines": 5,
"n_chars": 178,
"n_subproofs": 0,
"n_tac... | [
{
"name": "find_matching_iff_filter_contains",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 4,
"n_lines": 11,
"n_chars": 463,
"n_subproofs": 1,
"n_tactics": 5,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": fals... | 4 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -117,6 +117,10 @@
(mk kvs).toList = kvs
:= by simp only [toList]
+public theorem contains_iff_some_find? {α β} [BEq α] {m : Map α β} {k : α} :
+ m.contains k ↔ ∃ v, m.find? k = .some v
+:= by simp [contains, Option.isSome_iff_exists]
+
@[simp]
public theorem not_find?_of_empty [BEq α] {k : α} :
(Map.empt... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_ed099fd118bb_0 | 0d2374473eb010fb | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/TPE/WellTyped/GetAttr.lean | GetAttr | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 3 | 1 | [
{
"theorem_name": "entity_attr_well_typed",
"depth": 1,
"n_commands": 0,
"n_lines": 53,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intros h_wf h_ref h_ent h_attrs h_find h_schema h_rty_find\n unfold RequestAndEntitiesRefine at h_ref\n rcases h_... | [
{
"name": "find_lifted_type",
"text": "theorem find_lifted_type {attr ty₁ ty₂} {m: RecordType} :\n Map.find? m attr = some ty₁ →\n Map.find? m.liftBoolTypes attr = some ty₂ →\n ty₂ = ty₁.liftBoolTypes\n:= by\n simp only [Map.find?]\n intro h₁ h₂\n cases h₃: m.toList\n case nil =>\n rw [h₃] at h₁\n... | [
{
"name": "entity_attr_well_typed",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 67,
"n_chars": 2708,
"n_subproofs": 3,
"n_tactics": 54,
"cyclomatic": 11,
"n_automation": 9,
"n_rewrites": 17,
"n_structural": 15,
"automation_only": false,
... | 2 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -31,6 +31,41 @@
open Cedar.Validation
open Cedar.TPE
+theorem find_lifted_type {attr ty₁ ty₂} {m: RecordType} :
+ Map.find? m attr = some ty₁ →
+ Map.find? m.liftBoolTypes attr = some ty₂ →
+ ty₂ = ty₁.liftBoolTypes
+:= by
+ simp only [Map.find?]
+ intro h₁ h₂
+ cases h₃: m.toList
+ case nil =>
+ rw [h... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_ed099fd118bb_1 | c80953c43d9c36e2 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/TPE/WellTyped/GetAttr.lean | GetAttr | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 3 | 1 | [
{
"theorem_name": "entity_attr_well_typed",
"depth": 1,
"n_commands": 0,
"n_lines": 53,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intros h_wf h_ref h_ent h_attrs h_find h_schema h_rty_find\n unfold RequestAndEntitiesRefine at h_ref\n rcases h_... | [
{
"name": "find_lifted_type",
"text": "theorem find_lifted_type {attr ty₁ ty₂} {m: RecordType} :\n Map.find? m attr = some ty₁ →\n Map.find? m.liftBoolTypes attr = some ty₂ →\n ty₂ = ty₁.liftBoolTypes\n:= by\n simp only [Map.find?]\n intro h₁ h₂\n cases h₃: m.toList\n case nil =>\n rw [h₃] at h₁\n... | [
{
"name": "partial_eval_well_typed_getAttr",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 3,
"n_lines": 114,
"n_chars": 4241,
"n_subproofs": 10,
"n_tactics": 112,
"cyclomatic": 20,
"n_automation": 13,
"n_rewrites": 21,
"n_structural": 31,
"automation_only... | 3 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -31,6 +31,41 @@
open Cedar.Validation
open Cedar.TPE
+theorem find_lifted_type {attr ty₁ ty₂} {m: RecordType} :
+ Map.find? m attr = some ty₁ →
+ Map.find? m.liftBoolTypes attr = some ty₂ →
+ ty₂ = ty₁.liftBoolTypes
+:= by
+ simp only [Map.find?]
+ intro h₁ h₂
+ cases h₃: m.toList
+ case nil =>
+ rw [h... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_b98264cfc206_0 | fc8315306dc1f665 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/SymCC/Term/Lit.lean | Lit | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 4 | 1 | [
{
"theorem_name": "isLiteral_set_cons",
"depth": 1,
"n_commands": 0,
"n_lines": 10,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro h₁\n have h₂ := Set.mem_mk_hd hd tl\n simp only [lit_term_set_implies_lit_elt h₁ h₂, true_and]\n apply lit_ter... | [
{
"name": "lit_term_set_impliedBy_lit_elts",
"text": "public theorem lit_term_set_impliedBy_lit_elts {s : Set Term} {ty : TermType} :\n (∀ t ∈ s, t.isLiteral) → (Term.set s ty).isLiteral\n:= by simp [Term.isLiteral]\n\n",
"fan_in": 1,
"n_lines": 5,
"n_chars": 168,
"n_subproofs": 0,
"n_t... | [
{
"name": "isLiteral_set_cons",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 15,
"n_chars": 537,
"n_subproofs": 1,
"n_tactics": 10,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 2,
"n_structural": 4,
"automation_only": false,
"max_ne... | 2 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -44,10 +44,23 @@
intro h₁ h₂
exact h₁ t h₂
+public theorem lit_term_set_impliedBy_lit_elts {s : Set Term} {ty : TermType} :
+ (∀ t ∈ s, t.isLiteral) → (Term.set s ty).isLiteral
+:= by simp [Term.isLiteral]
+
public theorem isLiteral_set_cons {hd : Term} {tl : List Term} {ty : TermType} :
(Term.set (Set.... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_b98264cfc206_1 | 0487c238f4041596 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/SymCC/Term/Lit.lean | Lit | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 4 | 1 | [
{
"theorem_name": "isLiteral_record_mapOnValues",
"depth": 1,
"n_commands": 0,
"n_lines": 12,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n constructor\n · intro h₁ b hb\n have ⟨a, ha⟩ := Map.in_values_exists_key hb\n apply lit_term_record_im... | [
{
"name": "lit_term_record_implies_lit_value",
"text": "public theorem lit_term_record_implies_lit_value {r : Map Attr Term} {a : Attr} {t : Term} :\n Term.isLiteral (Term.record r) → (a, t) ∈ r.toList → t.isLiteral\n:= by\n simp only [Term.isLiteral]\n rw [List.all_attach₂_snd]\n simp only [List.all_eq... | [
{
"name": "isLiteral_record_mapOnValues",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 16,
"n_chars": 610,
"n_subproofs": 1,
"n_tactics": 12,
"cyclomatic": 2,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 7,
"automation_only": false,
... | 1 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -37,11 +37,23 @@
Term.isLiteral (.set Set.empty eltsTy)
:= by simp [Term.isLiteral]
+public theorem lit_term_record_implies_lit_value {r : Map Attr Term} {a : Attr} {t : Term} :
+ Term.isLiteral (Term.record r) → (a, t) ∈ r.toList → t.isLiteral
+:= by
+ simp only [Term.isLiteral]
+ rw [List.all_attach₂_snd]... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_b98264cfc206_2 | 2ef07725b29b061b | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/SymCC/Term/Lit.lean | Lit | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 4 | 1 | [
{
"theorem_name": "wfl_of_type_bool_is_true_or_false",
"depth": 1,
"n_commands": 0,
"n_lines": 4,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro h₁ h₂\n have ⟨b, h₃⟩ := wfl_of_type_bool_is_bool h₁ h₂\n simp [h₃]",
"n_chars": 94,
"n_su... | [
{
"name": "wfl_of_type_bool_is_bool",
"text": "public theorem wfl_of_type_bool_is_bool {εs : SymEntities} {t : Term} :\n t.WellFormedLiteral εs →\n t.typeOf = .bool →\n ∃ b, t = .prim (.bool b)\n:= by\n intro h₁ h₂\n replace ⟨h₁, h₃⟩ := h₁\n cases t <;>\n try {simp only [Term.isLiteral, Bool.false_eq... | [
{
"name": "wfl_of_type_bool_is_true_or_false",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 10,
"n_chars": 286,
"n_subproofs": 1,
"n_tactics": 4,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": fals... | 1 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -52,11 +52,30 @@
(Term.prim p).isLiteral
:= by simp only [Term.isLiteral]
+public theorem wfl_of_type_bool_is_bool {εs : SymEntities} {t : Term} :
+ t.WellFormedLiteral εs →
+ t.typeOf = .bool →
+ ∃ b, t = .prim (.bool b)
+:= by
+ intro h₁ h₂
+ replace ⟨h₁, h₃⟩ := h₁
+ cases t <;>
+ try {simp only [Term... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_7bb278fe7c35_0 | a7e034811e1ad96f | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/SymCC/Compiler/Set.lean | Set | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 5 | 1 | [
{
"theorem_name": "compile_interpret_set_ifAllSome",
"depth": 1,
"n_commands": 0,
"n_lines": 34,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hwi := interpret_terms_wfls hI hwφ hty\n have hws := wf_some_setOf_map (wf_option_get_mem_of_type hw... | [
{
"name": "pe_interpret_terms_of_type_option",
"text": "theorem pe_interpret_terms_of_type_option {ts : List Term} {ty : TermType} {I : Interpretation} {εs : SymEntities}\n (hwi : ∀ t ∈ ts, (t.interpret I).WellFormedLiteral εs ∧ (t.interpret I).typeOf = .option ty) :\n (∃ ty, .none ty ∈ ts.map (Term.inter... | [
{
"name": "compile_interpret_set_ifAllSome",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 44,
"n_chars": 2208,
"n_subproofs": 8,
"n_tactics": 34,
"cyclomatic": 2,
"n_automation": 6,
"n_rewrites": 3,
"n_structural": 9,
"automation_only": fals... | 2 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -37,6 +37,23 @@
have hw := interpret_term_wfl hI (hwφ t ht)
simp only [hw, hty t ht, and_self]
+theorem pe_interpret_terms_of_type_option {ts : List Term} {ty : TermType} {I : Interpretation} {εs : SymEntities}
+ (hwi : ∀ t ∈ ts, (t.interpret I).WellFormedLiteral εs ∧ (t.interpret I).typeOf = .option ty) :
... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_7bb278fe7c35_1 | 0a35935c58a4208f | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/SymCC/Compiler/Set.lean | Set | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 5 | 1 | [
{
"theorem_name": "compile_interpret_set_ifAllSome",
"depth": 1,
"n_commands": 0,
"n_lines": 34,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hwi := interpret_terms_wfls hI hwφ hty\n have hws := wf_some_setOf_map (wf_option_get_mem_of_type hw... | [
{
"name": "pe_interpret_terms_of_type_option",
"text": "theorem pe_interpret_terms_of_type_option {ts : List Term} {ty : TermType} {I : Interpretation} {εs : SymEntities}\n (hwi : ∀ t ∈ ts, (t.interpret I).WellFormedLiteral εs ∧ (t.interpret I).typeOf = .option ty) :\n (∃ ty, .none ty ∈ ts.map (Term.inter... | [
{
"name": "compile_interpret_set",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 3,
"n_lines": 54,
"n_chars": 2440,
"n_subproofs": 4,
"n_tactics": 47,
"cyclomatic": 3,
"n_automation": 9,
"n_rewrites": 11,
"n_structural": 5,
"automation_only": false,
"m... | 3 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -37,6 +37,23 @@
have hw := interpret_term_wfl hI (hwφ t ht)
simp only [hw, hty t ht, and_self]
+theorem pe_interpret_terms_of_type_option {ts : List Term} {ty : TermType} {I : Interpretation} {εs : SymEntities}
+ (hwi : ∀ t ∈ ts, (t.interpret I).WellFormedLiteral εs ∧ (t.interpret I).typeOf = .option ty) :
... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_7bb278fe7c35_2 | abe83c5fcfc605d8 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/SymCC/Compiler/Set.lean | Set | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 5 | 1 | [
{
"theorem_name": "compile_evaluate_set",
"depth": 1,
"n_commands": 0,
"n_lines": 22,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n replace ⟨ts, hok, ht⟩ := compile_set_ok_implies hok\n replace ⟨ty, hd, tl, hcons, hty, ht⟩ := compileSet_ok_implies ... | [
{
"name": "same_forall₂_implies_same_set",
"text": "private theorem same_forall₂_implies_same_set {ts : List Term} {vs : List Value} {ty : TermType}\n (hs : List.Forall₂ (λ t v => v ∼ t) ts vs) :\n Term.value? (Term.set (Set.make ts) ty) = some (Value.set (Set.make vs))\n:= by\n unfold Term.value?\n sim... | [
{
"name": "compile_evaluate_set",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 31,
"n_chars": 1449,
"n_subproofs": 1,
"n_tactics": 22,
"cyclomatic": 1,
"n_automation": 4,
"n_rewrites": 3,
"n_structural": 1,
"automation_only": false,
"max... | 2 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -50,6 +50,32 @@
exists (hd' :: tl')
simp only [h₁, ih, List.map_cons, List.forall₂_cons, and_self]
+private theorem same_forall₂_implies_same_set {ts : List Term} {vs : List Value} {ty : TermType}
+ (hs : List.Forall₂ (λ t v => v ∼ t) ts vs) :
+ Term.value? (Term.set (Set.make ts) ty) = some (Value.set... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_dd93ad6ecd8b_2 | fee9842da3e026d9 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/SymCC/Opt/Compiler.lean | Compiler | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 21 | 2 | [
{
"theorem_name": "Opt.compileCall₁_footprint_wf",
"depth": 1,
"n_commands": 0,
"n_lines": 3,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n unfold Opt.compileCall₁\n exact Opt.compileCallWithError₁_footprint_wf",
"n_chars": 80,
"n_subproofs... | [
{
"name": "Opt.compileCallWithError₁_footprint_wf",
"text": "/--\nHelper lemma that `Opt.compileCallWithError₁` produces a well-formed footprint set.\n-/\nprivate theorem Opt.compileCallWithError₁_footprint_wf {xty : ExtType} {arg res : Opt.CompileResult} :\n arg.footprint.WellFormed →\n Opt.compileCallWi... | [
{
"name": "Opt.compile_footprint_wf",
"fan_in": 1,
"n_deps_direct": 5,
"n_deps_transitive": 5,
"n_lines": 259,
"n_chars": 10435,
"n_subproofs": 15,
"n_tactics": 345,
"cyclomatic": 39,
"n_automation": 124,
"n_rewrites": 38,
"n_structural": 80,
"automation_only": fa... | 5 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -295,13 +295,27 @@
· simp
/--
+Helper lemma that `Opt.compileCallWithError₁` produces a well-formed footprint set.
+-/
+private theorem Opt.compileCallWithError₁_footprint_wf {xty : ExtType} {arg res : Opt.CompileResult} :
+ arg.footprint.WellFormed →
+ Opt.compileCallWithError₁ xty enc arg = .ok res →
+ re... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_dd93ad6ecd8b_3 | 326bcd01b4f99407 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/SymCC/Opt/Compiler.lean | Compiler | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 21 | 1 | [
{
"theorem_name": "Opt.compile.correctness.record",
"depth": 1,
"n_commands": 0,
"n_lines": 44,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp [Opt.compile, SymCC.compile, footprint]\n simp only [List.mapM₂_eq_mapM (λ x => do Except.ok (x.fst, ... | [
{
"name": "both_lists_pairs_error_then_errors_same",
"text": "/--\nLemma pulled out from the below `mutual` block so that we can prove it on its own by induction\nwithout worrying about making the `mutual` block's termination proof even more complicated\n-/\nprivate theorem both_lists_pairs_error_then_error... | [
{
"name": "Opt.compile.correctness.lit",
"fan_in": 2,
"n_deps_direct": 1,
"n_deps_transitive": 35,
"n_lines": 15,
"n_chars": 542,
"n_subproofs": 0,
"n_tactics": 6,
"cyclomatic": 5,
"n_automation": 3,
"n_rewrites": 0,
"n_structural": 1,
"automation_only": false,
... | 20 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -637,6 +637,41 @@
Lemma pulled out from the below `mutual` block so that we can prove it on its own by induction
without worrying about making the `mutual` block's termination proof even more complicated
-/
+private theorem both_lists_pairs_error_then_errors_same {xs : List (Attr × Expr)} {εnv : SymEnv} :
+ xs.m... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_dd93ad6ecd8b_4 | 47f714e325487778 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/SymCC/Opt/Compiler.lean | Compiler | 4 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 21 | 2 | [
{
"theorem_name": "Opt.compile.correctness.set",
"depth": 1,
"n_commands": 0,
"n_lines": 40,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp [Opt.compile, SymCC.compile, footprint]\n rw [List.mapM₁_eq_mapM (Opt.compile · εnv), List.mapM₁_eq_mapM... | [
{
"name": "both_lists_ok_then_elts_correspond",
"text": "/--\nLemma pulled out from the below `mutual` block so that we can prove it on its own by induction\nwithout worrying about making the `mutual` block's termination proof even more complicated\n-/\nprivate theorem both_lists_ok_then_elts_correspond {xs... | [
{
"name": "Opt.compile.correctness.andor",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 35,
"n_lines": 36,
"n_chars": 1341,
"n_subproofs": 0,
"n_tactics": 25,
"cyclomatic": 15,
"n_automation": 8,
"n_rewrites": 3,
"n_structural": 3,
"automation_only": fals... | 20 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -672,6 +672,43 @@
Lemma pulled out from the below `mutual` block so that we can prove it on its own by induction
without worrying about making the `mutual` block's termination proof even more complicated
-/
+private theorem both_lists_ok_then_elts_correspond {xs : List Expr} {εnv : SymEnv} :
+ xs.mapM (Opt.compi... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_e95877971f2c_0 | 318883a8a74a8fdd | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/SymCC/Verifier/VerifyIsAuthorized.lean | VerifyIsAuthorized | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 3 | 2 | [
{
"theorem_name": "verifyIsAuthorized_is_sound",
"depth": 1,
"n_commands": 0,
"n_lines": 23,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro ⟨hwφ, hiφ, hφf⟩ hwε₁ hwε₂ hok hsat env ⟨I, hwI, heq⟩ hwe₁ hwe₂\n rw [asserts_unsatisfiable_def] at hsat... | [
{
"name": "wbaq_bisimulation",
"text": "private theorem wbaq_bisimulation {φ : Term → Term → Term} {f : Response → Response → Bool} {εs : SymEntities} {t₁ t₂ : Term} {r₁ r₂ : Response} {I : Interpretation} :\n WellBehavedIsAuthorizedQuery.WellFormedInputs t₁ t₂ εs →\n WellBehavedIsAuthorizedQuery.Same φ f... | [
{
"name": "verifyIsAuthorized_is_sound",
"fan_in": 0,
"n_deps_direct": 3,
"n_deps_transitive": 3,
"n_lines": 36,
"n_chars": 2047,
"n_subproofs": 5,
"n_tactics": 23,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 4,
"n_structural": 2,
"automation_only": false,
... | 3 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -52,6 +52,20 @@
r₁ ∼ t₁ → r₂ ∼ t₂ →
(f r₁ r₂) ∼ (φ t₁ t₂)
+private theorem wbaq_bisimulation {φ : Term → Term → Term} {f : Response → Response → Bool} {εs : SymEntities} {t₁ t₂ : Term} {r₁ r₂ : Response} {I : Interpretation} :
+ WellBehavedIsAuthorizedQuery.WellFormedInputs t₁ t₂ εs →
+ WellBehaved... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_e95877971f2c_1 | 163ca534eb1aacb3 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/SymCC/Verifier/VerifyIsAuthorized.lean | VerifyIsAuthorized | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 3 | 2 | [
{
"theorem_name": "verifyIsAuthorized_is_sound",
"depth": 1,
"n_commands": 0,
"n_lines": 23,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro ⟨hwφ, hiφ, hφf⟩ hwε₁ hwε₂ hok hsat env ⟨I, hwI, heq⟩ hwe₁ hwe₂\n rw [asserts_unsatisfiable_def] at hsat... | [
{
"name": "wbaq_bisimulation",
"text": "private theorem wbaq_bisimulation {φ : Term → Term → Term} {f : Response → Response → Bool} {εs : SymEntities} {t₁ t₂ : Term} {r₁ r₂ : Response} {I : Interpretation} :\n WellBehavedIsAuthorizedQuery.WellFormedInputs t₁ t₂ εs →\n WellBehavedIsAuthorizedQuery.Same φ f... | [
{
"name": "verifyIsAuthorized_is_complete",
"fan_in": 0,
"n_deps_direct": 3,
"n_deps_transitive": 3,
"n_lines": 48,
"n_chars": 2808,
"n_subproofs": 7,
"n_tactics": 34,
"cyclomatic": 2,
"n_automation": 4,
"n_rewrites": 4,
"n_structural": 9,
"automation_only": false... | 3 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -52,6 +52,20 @@
r₁ ∼ t₁ → r₂ ∼ t₂ →
(f r₁ r₂) ∼ (φ t₁ t₂)
+private theorem wbaq_bisimulation {φ : Term → Term → Term} {f : Response → Response → Bool} {εs : SymEntities} {t₁ t₂ : Term} {r₁ r₂ : Response} {I : Interpretation} :
+ WellBehavedIsAuthorizedQuery.WellFormedInputs t₁ t₂ εs →
+ WellBehaved... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_a39d1a5d1544_0 | 3e6f3bb422d587f2 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/SymCC/Compiler.lean | Compiler | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 2 | 1 | [
{
"theorem_name": "compile_bisimulation",
"depth": 1,
"n_commands": 0,
"n_lines": 5,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intros h₁ h₂ h₃ h₄ h₅\n have h₆ := interpret_εnv_wf_for_expr h₁ h₃\n have h₇ := compile_interpret h₃ h₁ h₅\n exact ... | [
{
"name": "compile_interpret",
"text": "/--\nThe lemma shows that `interpret` and `compile` can be applied in any order to get\nthe same result. In particular, let `x` be an expression, `εnv` a well-formed\nsymbolic environment for `x`, and `I` a well-formed interpretion for `εnv`.\nThen, compiling `x` with... | [
{
"name": "compile_bisimulation",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 14,
"n_chars": 490,
"n_subproofs": 2,
"n_tactics": 5,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 2,
"automation_only": false,
"max_n... | 2 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -98,6 +98,66 @@
exact @compile_evaluate xᵢ
exact compile_evaluate_call h₁ h₂ h₃ h₄ ih
+/--
+The lemma shows that `interpret` and `compile` can be applied in any order to get
+the same result. In particular, let `x` be an expression, `εnv` a well-formed
+symbolic environment for `x`, and `I` a well-form... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_efce4237cb20_0 | 63baeac78cab6cc1 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/SymCC/Compiler/Attr.lean | Attr | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 17 | 2 | [
{
"theorem_name": "compile_evaluate_hasAttr_record",
"depth": 1,
"n_commands": 0,
"n_lines": 24,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [RecordHasAttr, hwo.right, TermType.record.injEq] at ha\n replace ⟨hrty, ha⟩ := ha\n rw [eq_co... | [
{
"name": "compile_evaluate_hasAttr_record_aux",
"text": "private theorem compile_evaluate_hasAttr_record_aux\n {a : Attr} {t₂ : Term} {εs : SymEntities}\n {rty : Map Attr TermType} {rt : Map Attr Term} {rv : Map Attr Value}\n (hwφ₂ : Term.WellFormed εs t₂ ∧ Term.typeOf t₂ = TermType.option TermType.boo... | [
{
"name": "compile_evaluate_hasAttr_record",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 36,
"n_chars": 1623,
"n_subproofs": 3,
"n_tactics": 25,
"cyclomatic": 2,
"n_automation": 5,
"n_rewrites": 7,
"n_structural": 2,
"automation_only": fals... | 1 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -27,6 +27,51 @@
open Batteries Data Spec SymCC Factory
+private theorem compile_evaluate_hasAttr_record_aux
+ {a : Attr} {t₂ : Term} {εs : SymEntities}
+ {rty : Map Attr TermType} {rt : Map Attr Term} {rv : Map Attr Value}
+ (hwφ₂ : Term.WellFormed εs t₂ ∧ Term.typeOf t₂ = TermType.option TermType.bool)
+ ... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_efce4237cb20_1 | 25e1ee41f07eec7f | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/SymCC/Compiler/Attr.lean | Attr | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 17 | 2 | [
{
"theorem_name": "compile_evaluate_hasAttr_entity",
"depth": 1,
"n_commands": 0,
"n_lines": 25,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [RecordHasAttr] at ha\n replace ⟨hrty, ha⟩ := ha\n rw [eq_comm] at hrty\n have ht₁ := same_ok... | [
{
"name": "compile_evaluate_attrsOrEmpty",
"text": "private theorem compile_evaluate_attrsOrEmpty\n {es : Entities} {εs : SymEntities} {uid : EntityUID} {fₐ : UnaryFunction} {rty : Map Attr TermType}\n (heq : SameEntities es εs)\n (hwε : SymEntities.WellFormed εs)\n (hf : SymEntities.attrs εs uid.ty = ... | [
{
"name": "compile_evaluate_hasAttr_entity",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 42,
"n_chars": 1871,
"n_subproofs": 2,
"n_tactics": 25,
"cyclomatic": 2,
"n_automation": 6,
"n_rewrites": 6,
"n_structural": 2,
"automation_only": fals... | 2 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -72,6 +72,40 @@
simp only [Same.same, SameResults, SameValues, value?_bool, Map.contains, heq,
Option.isSome_none]
+private theorem compile_evaluate_attrsOrEmpty
+ {es : Entities} {εs : SymEntities} {uid : EntityUID} {fₐ : UnaryFunction} {rty : Map Attr TermType}
+ (heq : SameEntities es εs)
+ (hwε ... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_efce4237cb20_2 | d87fee71f080bee8 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/SymCC/Compiler/Attr.lean | Attr | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 17 | 2 | [
{
"theorem_name": "compile_evaluate_hasAttr_entity",
"depth": 1,
"n_commands": 0,
"n_lines": 25,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [RecordHasAttr] at ha\n replace ⟨hrty, ha⟩ := ha\n rw [eq_comm] at hrty\n have ht₁ := same_ok... | [
{
"name": "compile_evaluate_attrsOrEmpty",
"text": "private theorem compile_evaluate_attrsOrEmpty\n {es : Entities} {εs : SymEntities} {uid : EntityUID} {fₐ : UnaryFunction} {rty : Map Attr TermType}\n (heq : SameEntities es εs)\n (hwε : SymEntities.WellFormed εs)\n (hf : SymEntities.attrs εs uid.ty = ... | [
{
"name": "compile_evaluate_hasAttr",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 4,
"n_lines": 38,
"n_chars": 1525,
"n_subproofs": 4,
"n_tactics": 32,
"cyclomatic": 5,
"n_automation": 1,
"n_rewrites": 6,
"n_structural": 4,
"automation_only": false,
... | 4 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -107,6 +107,40 @@
simp only [hasAttr, attrsOf, Except.bind_ok]
exact compile_evaluate_hasAttr_record_aux hwφ₂ ha hwo hlit ih
+private theorem compile_evaluate_attrsOrEmpty
+ {es : Entities} {εs : SymEntities} {uid : EntityUID} {fₐ : UnaryFunction} {rty : Map Attr TermType}
+ (heq : SameEntities es εs)
... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_efce4237cb20_3 | 791be2c6bf104ae1 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/SymCC/Compiler/Attr.lean | Attr | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 17 | 1 | [
{
"theorem_name": "interpret_compileAttrsOf",
"depth": 1,
"n_commands": 0,
"n_lines": 15,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [compileAttrsOf]\n have hwt' := interpret_term_wf hI hwt\n simp only [hwt'.right]\n simp only [compi... | [
{
"name": "interpret_εs_attrs",
"text": "private theorem interpret_εs_attrs {εs : SymEntities} {I : Interpretation} {ety : EntityType} {fₐ : UnaryFunction}\n (hf : SymEntities.attrs εs ety = some fₐ) :\n SymEntities.attrs (SymEntities.interpret I εs) ety = some (fₐ.interpret I)\n:= by\n simp only [SymEn... | [
{
"name": "interpret_compileAttrsOf",
"fan_in": 2,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 23,
"n_chars": 919,
"n_subproofs": 2,
"n_tactics": 20,
"cyclomatic": 6,
"n_automation": 9,
"n_rewrites": 2,
"n_structural": 0,
"automation_only": false,
"... | 1 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -27,13 +27,42 @@
open Batteries Data Spec SymCC Factory
+private theorem interpret_εs_attrs {εs : SymEntities} {I : Interpretation} {ety : EntityType} {fₐ : UnaryFunction}
+ (hf : SymEntities.attrs εs ety = some fₐ) :
+ SymEntities.attrs (SymEntities.interpret I εs) ety = some (fₐ.interpret I)
+:= by
+ simp... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_efce4237cb20_4 | e4ec1defa5d2da9e | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/SymCC/Compiler/Attr.lean | Attr | 4 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 17 | 2 | [
{
"theorem_name": "interpret_compileHasAttr",
"depth": 1,
"n_commands": 0,
"n_lines": 21,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [compileHasAttr]\n replace ⟨t₂, rty, hok, ht⟩ := compileHasAttr_ok_implies hok\n have hok' := interpr... | [
{
"name": "interpret_compileAttrsOf",
"text": "private theorem interpret_compileAttrsOf {t t₁: Term} {εs : SymEntities} {I : Interpretation}\n (hwε : εs.WellFormed)\n (hI : Interpretation.WellFormed I εs)\n (hwt : Term.WellFormed εs t₁)\n (hok : compileAttrsOf t₁ εs = Except.ok t) :\n compileAttrsOf (... | [
{
"name": "interpret_compileHasAttr",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 2,
"n_lines": 29,
"n_chars": 1048,
"n_subproofs": 3,
"n_tactics": 25,
"cyclomatic": 6,
"n_automation": 7,
"n_rewrites": 1,
"n_structural": 0,
"automation_only": false,
... | 2 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -42,13 +42,55 @@
case right =>
simp only [SymEntityData.interpret]
+private theorem interpret_compileAttrsOf {t t₁: Term} {εs : SymEntities} {I : Interpretation}
+ (hwε : εs.WellFormed)
+ (hI : Interpretation.WellFormed I εs)
+ (hwt : Term.WellFormed εs t₁)
+ (hok : compileAttrsOf t₁ εs = Except.ok t)... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_efce4237cb20_5 | e637c69525d7a56d | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/SymCC/Compiler/Attr.lean | Attr | 5 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 17 | 2 | [
{
"theorem_name": "compileHasAttr_ok_typeOf",
"depth": 1,
"n_commands": 0,
"n_lines": 11,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [compileHasAttr, someOf]\n replace ⟨t₄, rty, hok, ht⟩ := compileHasAttr_ok_implies hok\n have ⟨_, hok... | [
{
"name": "compileAttrsOf_ok_typeOf",
"text": "private theorem compileAttrsOf_ok_typeOf {t t₁ t₂ : Term} {εs : SymEntities}\n (hwε : εs.WellFormed)\n (hw₁ : t₁.WellFormed εs)\n (hw₂ : t₂.WellFormed εs)\n (hty : t₁.typeOf = t₂.typeOf)\n (hok : compileAttrsOf t₁ εs = Except.ok t) :\n ∃ t₃, compileAttrsO... | [
{
"name": "compileHasAttr_ok_typeOf",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 20,
"n_chars": 778,
"n_subproofs": 1,
"n_tactics": 13,
"cyclomatic": 3,
"n_automation": 5,
"n_rewrites": 1,
"n_structural": 0,
"automation_only": false,
"... | 1 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -27,6 +27,31 @@
open Batteries Data Spec SymCC Factory
+private theorem compileAttrsOf_ok_typeOf {t t₁ t₂ : Term} {εs : SymEntities}
+ (hwε : εs.WellFormed)
+ (hw₁ : t₁.WellFormed εs)
+ (hw₂ : t₂.WellFormed εs)
+ (hty : t₁.typeOf = t₂.typeOf)
+ (hok : compileAttrsOf t₁ εs = Except.ok t) :
+ ∃ t₃, compileA... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_efce4237cb20_6 | 1e1a4e2cd339c601 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/SymCC/Compiler/Attr.lean | Attr | 6 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 17 | 1 | [
{
"theorem_name": "compile_interpret_hasAttr",
"depth": 1,
"n_commands": 0,
"n_lines": 29,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hwε' := interpret_εntities_wf hwε.left.right hI\n replace ⟨t₂, t₃, hok, ha, ht⟩ := compile_hasAttr_ok_impl... | [
{
"name": "compileHasAttr_ok_typeOf",
"text": "private theorem compileHasAttr_ok_typeOf {t t₁ t₂ : Term} {a : Attr} {εs : SymEntities}\n (hwε : εs.WellFormed)\n (hw₁ : t₁.WellFormed εs)\n (hw₂ : t₂.WellFormed εs)\n (hty : t₁.typeOf = t₂.typeOf)\n (hok : compileHasAttr t₁ a εs = Except.ok t) :\n ∃ t₃, ... | [
{
"name": "compile_interpret_hasAttr",
"fan_in": 0,
"n_deps_direct": 3,
"n_deps_transitive": 6,
"n_lines": 37,
"n_chars": 1970,
"n_subproofs": 10,
"n_tactics": 32,
"cyclomatic": 3,
"n_automation": 4,
"n_rewrites": 4,
"n_structural": 2,
"automation_only": false,
... | 6 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -117,6 +117,25 @@
replace ha₂ := (wf_app hw₂ ha₂ hwf.left).right
simp only [ha₂, ha₁]
+private theorem compileHasAttr_ok_typeOf {t t₁ t₂ : Term} {a : Attr} {εs : SymEntities}
+ (hwε : εs.WellFormed)
+ (hw₁ : t₁.WellFormed εs)
+ (hw₂ : t₂.WellFormed εs)
+ (hty : t₁.typeOf = t₂.typeOf)
+ (hok : compil... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_efce4237cb20_7 | c01c4fe7a5b3419e | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/SymCC/Compiler/Attr.lean | Attr | 7 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 17 | 2 | [
{
"theorem_name": "compile_evaluate_getAttr_record",
"depth": 1,
"n_commands": 0,
"n_lines": 25,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [RecordGetAttr, hwo.right, TermType.record.injEq] at ha\n replace ⟨hrty, ha⟩ := ha\n rw [eq_co... | [
{
"name": "compile_evaluate_getAttr_record_aux",
"text": "private theorem compile_evaluate_getAttr_record_aux\n {a : Attr} {t₂ : Term} {tyₐ tyₐ' : TermType} {εs : SymEntities}\n {rty : Map Attr TermType} {rt : Map Attr Term} {rv : Map Attr Value}\n (hwφ₂ : Term.WellFormed εs t₂)\n (htyₐ : Term.typeOf t... | [
{
"name": "compile_evaluate_getAttr_record",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 39,
"n_chars": 1679,
"n_subproofs": 3,
"n_tactics": 26,
"cyclomatic": 2,
"n_automation": 5,
"n_rewrites": 7,
"n_structural": 2,
"automation_only": fals... | 1 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -27,6 +27,41 @@
open Batteries Data Spec SymCC Factory
+private theorem compile_evaluate_getAttr_record_aux
+ {a : Attr} {t₂ : Term} {tyₐ tyₐ' : TermType} {εs : SymEntities}
+ {rty : Map Attr TermType} {rt : Map Attr Term} {rv : Map Attr Value}
+ (hwφ₂ : Term.WellFormed εs t₂)
+ (htyₐ : Term.typeOf t₂ = Te... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_efce4237cb20_8 | 5f519f8c47a4b1f7 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/SymCC/Compiler/Attr.lean | Attr | 8 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 17 | 2 | [
{
"theorem_name": "compile_evaluate_getAttr_record",
"depth": 1,
"n_commands": 0,
"n_lines": 25,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [RecordGetAttr, hwo.right, TermType.record.injEq] at ha\n replace ⟨hrty, ha⟩ := ha\n rw [eq_co... | [
{
"name": "compile_evaluate_getAttr_record_aux",
"text": "private theorem compile_evaluate_getAttr_record_aux\n {a : Attr} {t₂ : Term} {tyₐ tyₐ' : TermType} {εs : SymEntities}\n {rty : Map Attr TermType} {rt : Map Attr Term} {rv : Map Attr Value}\n (hwφ₂ : Term.WellFormed εs t₂)\n (htyₐ : Term.typeOf t... | [
{
"name": "compile_evaluate_getAttr_entity",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 48,
"n_chars": 2126,
"n_subproofs": 2,
"n_tactics": 30,
"cyclomatic": 2,
"n_automation": 8,
"n_rewrites": 7,
"n_structural": 2,
"automation_only": fals... | 2 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -61,6 +61,41 @@
simp only [hrty, heq, and_true, true_and]
exact (And.intro hwa.left hlit)
+private theorem compile_evaluate_getAttr_record_aux
+ {a : Attr} {t₂ : Term} {tyₐ tyₐ' : TermType} {εs : SymEntities}
+ {rty : Map Attr TermType} {rt : Map Attr Term} {rv : Map Attr Value}
+ (hwφ₂ : Term.WellFormed... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_efce4237cb20_9 | fffcee0e116a61b0 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/SymCC/Compiler/Attr.lean | Attr | 9 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 17 | 1 | [
{
"theorem_name": "compile_evaluate_getAttr",
"depth": 1,
"n_commands": 0,
"n_lines": 29,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n replace ⟨t₁, t₂, hok, hr, ht⟩ := compile_getAttr_ok_implies hok\n subst ht\n replace hwe := wf_env_for_getAttr_... | [
{
"name": "compile_evaluate_getAttr_record",
"text": "private theorem compile_evaluate_getAttr_record\n {a : Attr} {v₁ : Value} {es : Entities}\n {εs : SymEntities} {t₁ t₂ : Term} {ty₁ tyₐ : TermType} {rty rty': Map Attr TermType}\n (hwφ₁ : Term.WellFormed εs t₁)\n (hty₁ : Term.typeOf t₁ = TermType.opti... | [
{
"name": "compile_evaluate_getAttr",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 4,
"n_lines": 38,
"n_chars": 1554,
"n_subproofs": 4,
"n_tactics": 32,
"cyclomatic": 5,
"n_automation": 1,
"n_rewrites": 6,
"n_structural": 4,
"automation_only": false,
... | 4 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -96,6 +96,43 @@
replace ⟨vₐ, hf', hf''⟩ := record_value?_find?_required (wf_term_record_implies_wf_map hwo.left) hnopt hf ih
simp only [Same.same, SameResults, Map.findOrErr, hf', pe_record_get hf, SameValues, hf'']
+private theorem compile_evaluate_getAttr_record
+ {a : Attr} {v₁ : Value} {es : Entitie... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_efce4237cb20_10 | 423d7277d6c3ee0c | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/SymCC/Compiler/Attr.lean | Attr | 10 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 17 | 2 | [
{
"theorem_name": "interpret_compileHasAttr",
"depth": 1,
"n_commands": 0,
"n_lines": 21,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [compileHasAttr]\n replace ⟨t₂, rty, hok, ht⟩ := compileHasAttr_ok_implies hok\n have hok' := interpr... | [
{
"name": "interpret_compileAttrsOf",
"text": "private theorem interpret_compileAttrsOf {t t₁: Term} {εs : SymEntities} {I : Interpretation}\n (hwε : εs.WellFormed)\n (hI : Interpretation.WellFormed I εs)\n (hwt : Term.WellFormed εs t₁)\n (hok : compileAttrsOf t₁ εs = Except.ok t) :\n compileAttrsOf (... | [
{
"name": "interpret_compileGetAttr",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 2,
"n_lines": 36,
"n_chars": 1198,
"n_subproofs": 3,
"n_tactics": 34,
"cyclomatic": 10,
"n_automation": 8,
"n_rewrites": 3,
"n_structural": 0,
"automation_only": false,
... | 2 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -42,13 +42,62 @@
case right =>
simp only [SymEntityData.interpret]
+private theorem interpret_compileAttrsOf {t t₁: Term} {εs : SymEntities} {I : Interpretation}
+ (hwε : εs.WellFormed)
+ (hI : Interpretation.WellFormed I εs)
+ (hwt : Term.WellFormed εs t₁)
+ (hok : compileAttrsOf t₁ εs = Except.ok t)... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_efce4237cb20_11 | 73cc59798034767f | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/SymCC/Compiler/Attr.lean | Attr | 11 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 17 | 2 | [
{
"theorem_name": "compileHasAttr_ok_typeOf",
"depth": 1,
"n_commands": 0,
"n_lines": 11,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n simp only [compileHasAttr, someOf]\n replace ⟨t₄, rty, hok, ht⟩ := compileHasAttr_ok_implies hok\n have ⟨_, hok... | [
{
"name": "compileAttrsOf_ok_typeOf",
"text": "private theorem compileAttrsOf_ok_typeOf {t t₁ t₂ : Term} {εs : SymEntities}\n (hwε : εs.WellFormed)\n (hw₁ : t₁.WellFormed εs)\n (hw₂ : t₂.WellFormed εs)\n (hty : t₁.typeOf = t₂.typeOf)\n (hok : compileAttrsOf t₁ εs = Except.ok t) :\n ∃ t₃, compileAttrsO... | [
{
"name": "compileGetAttr_ok_typeOf",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 23,
"n_chars": 885,
"n_subproofs": 1,
"n_tactics": 16,
"cyclomatic": 3,
"n_automation": 6,
"n_rewrites": 1,
"n_structural": 0,
"automation_only": false,
"... | 1 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -27,6 +27,31 @@
open Batteries Data Spec SymCC Factory
+private theorem compileAttrsOf_ok_typeOf {t t₁ t₂ : Term} {εs : SymEntities}
+ (hwε : εs.WellFormed)
+ (hw₁ : t₁.WellFormed εs)
+ (hw₂ : t₂.WellFormed εs)
+ (hty : t₁.typeOf = t₂.typeOf)
+ (hok : compileAttrsOf t₁ εs = Except.ok t) :
+ ∃ t₃, compileA... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_efce4237cb20_12 | 880f9343a1de865a | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/SymCC/Compiler/Attr.lean | Attr | 12 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 17 | 1 | [
{
"theorem_name": "compileGetAttr_ok_typeOf_eq",
"depth": 1,
"n_commands": 0,
"n_lines": 19,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n replace ⟨t₁', rty₁, hok₁, ht₁⟩ := compileGetAttr_ok_implies hok₁\n replace ⟨t₂', rty₂, hok₂, ht₂⟩ := compileG... | [
{
"name": "compileAttrsOf_ok_typeOf_eq",
"text": "private theorem compileAttrsOf_ok_typeOf_eq {t₁ t₁' t₂ t₂' : Term} {εs : SymEntities}\n (hwε : εs.WellFormed)\n (hw₁ : t₁.WellFormed εs)\n (hw₂ : t₂.WellFormed εs)\n (hty : t₁.typeOf = t₂.typeOf)\n (hok₁ : compileAttrsOf t₁ εs = Except.ok t₁')\n (hok₂ ... | [
{
"name": "compileGetAttr_ok_typeOf_eq",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 29,
"n_chars": 1172,
"n_subproofs": 1,
"n_tactics": 19,
"cyclomatic": 2,
"n_automation": 4,
"n_rewrites": 4,
"n_structural": 0,
"automation_only": false,
... | 1 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -27,6 +27,47 @@
open Batteries Data Spec SymCC Factory
+private theorem compileAttrsOf_ok_typeOf_eq {t₁ t₁' t₂ t₂' : Term} {εs : SymEntities}
+ (hwε : εs.WellFormed)
+ (hw₁ : t₁.WellFormed εs)
+ (hw₂ : t₂.WellFormed εs)
+ (hty : t₁.typeOf = t₂.typeOf)
+ (hok₁ : compileAttrsOf t₁ εs = Except.ok t₁')
+ (hok... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_efce4237cb20_13 | e4ab8e136e7e936c | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/SymCC/Compiler/Attr.lean | Attr | 13 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 17 | 1 | [
{
"theorem_name": "compile_interpret_getAttr",
"depth": 1,
"n_commands": 0,
"n_lines": 33,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have hwε' := interpret_εntities_wf hwε.left.right hI\n replace ⟨t₂, t₃, hok, ha, ht⟩ := compile_getAttr_ok_impl... | [
{
"name": "compileGetAttr_ok_typeOf",
"text": "private theorem compileGetAttr_ok_typeOf {t t₁ t₂ : Term} {a : Attr} {εs : SymEntities}\n (hwε : εs.WellFormed)\n (hw₁ : t₁.WellFormed εs)\n (hw₂ : t₂.WellFormed εs)\n (hty : t₁.typeOf = t₂.typeOf)\n (hok : compileGetAttr t₁ a εs = Except.ok t) :\n ∃ t₃, ... | [
{
"name": "compile_interpret_getAttr",
"fan_in": 0,
"n_deps_direct": 4,
"n_deps_transitive": 8,
"n_lines": 41,
"n_chars": 2271,
"n_subproofs": 13,
"n_tactics": 36,
"cyclomatic": 3,
"n_automation": 7,
"n_rewrites": 4,
"n_structural": 1,
"automation_only": false,
... | 8 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -142,6 +142,28 @@
interpret_term_some,
interpret_record_get I hwt₂ hty hf]
+private theorem compileGetAttr_ok_typeOf {t t₁ t₂ : Term} {a : Attr} {εs : SymEntities}
+ (hwε : εs.WellFormed)
+ (hw₁ : t₁.WellFormed εs)
+ (hw₂ : t₂.WellFormed εs)
+ (hty : t₁.typeOf = t₂.typeOf)
+ (hok : compileGe... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_2f9ab9504476_0 | 8861199bc38a54ec | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Validation/Typechecker/BinaryApp/Eq.lean | Eq | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 2 | 1 | [
{
"theorem_name": "type_of_eq_is_sound",
"depth": 1,
"n_commands": 0,
"n_lines": 42,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n have ⟨hc, hty⟩ := type_of_eq_inversion h₃\n subst hc\n apply And.intro empty_guarded_capabilities_invariant\n split... | [
{
"name": "no_entity_type_lub_implies_not_eq",
"text": "theorem no_entity_type_lub_implies_not_eq {env : TypeEnv} {v₁ v₂ : Value} {ety₁ ety₂ : EntityType}\n (h₁ : InstanceOfType env v₁ (CedarType.entity ety₁))\n (h₂ : InstanceOfType env v₂ (CedarType.entity ety₂))\n (h₃ : (CedarType.entity ety₁ ⊔ CedarTy... | [
{
"name": "type_of_eq_is_sound",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 52,
"n_chars": 2400,
"n_subproofs": 3,
"n_tactics": 55,
"cyclomatic": 16,
"n_automation": 9,
"n_rewrites": 9,
"n_structural": 12,
"automation_only": false,
"ma... | 2 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -91,6 +91,21 @@
· exists ety₁
· exists ety₂
+theorem no_entity_type_lub_implies_not_eq {env : TypeEnv} {v₁ v₂ : Value} {ety₁ ety₂ : EntityType}
+ (h₁ : InstanceOfType env v₁ (CedarType.entity ety₁))
+ (h₂ : InstanceOfType env v₂ (CedarType.entity ety₂))
+ (h₃ : (CedarType.entity ety₁ ⊔... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_1f697f957812_0 | 74da5748401cbdc8 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Validation/RequestEntityValidation.lean | RequestEntityValidation | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 7 | 1 | [
{
"theorem_name": "instance_of_type_refl",
"depth": 1,
"n_commands": 0,
"n_lines": 113,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro h₀\n unfold instanceOfType at h₀\n cases v with\n | prim p =>\n cases p with\n | bool b =>\n ca... | [
{
"name": "instance_of_bool_type_refl",
"text": "theorem instance_of_bool_type_refl {b : Bool} {bty : BoolType} :\n instanceOfBoolType b bty = true → InstanceOfBoolType b bty\n:= by\n simp only [instanceOfBoolType, InstanceOfBoolType]\n intro h₀\n cases h₁ : b <;> cases h₂ : bty <;> subst h₁ <;> subst h... | [
{
"name": "instance_of_type_refl",
"fan_in": 2,
"n_deps_direct": 3,
"n_deps_transitive": 3,
"n_lines": 117,
"n_chars": 3880,
"n_subproofs": 10,
"n_tactics": 115,
"cyclomatic": 14,
"n_automation": 26,
"n_rewrites": 7,
"n_structural": 35,
"automation_only": false,
... | 3 | import Cedar.Validation.RequestEntityValidator
import Cedar.Validation.EnvironmentValidator
import Cedar.Thm.Validation.EnvironmentValidation
import Cedar.Thm.Validation.Typechecker.Types
import Cedar.Thm.Validation.Validator
namespace Cedar.Thm
open Cedar.Data
open Cedar.Spec
open Cedar.Validation
theorem instance_... | import Cedar.Validation.RequestEntityValidator
import Cedar.Validation.EnvironmentValidator
import Cedar.Thm.Validation.EnvironmentValidation
import Cedar.Thm.Validation.Typechecker.Types
import Cedar.Thm.Validation.Validator
namespace Cedar.Thm
open Cedar.Data
open Cedar.Spec
open Cedar.Validation
theorem instance_... | @@ -10,6 +10,13 @@
open Cedar.Spec
open Cedar.Validation
+theorem instance_of_bool_type_refl {b : Bool} {bty : BoolType} :
+ instanceOfBoolType b bty = true → InstanceOfBoolType b bty
+:= by
+ simp only [instanceOfBoolType, InstanceOfBoolType]
+ intro h₀
+ cases h₁ : b <;> cases h₂ : bty <;> subst h₁ <;> subst ... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_1f697f957812_1 | f49a1e10ddf9aa4f | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Validation/RequestEntityValidation.lean | RequestEntityValidation | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 7 | 2 | [
{
"theorem_name": "instance_of_type_refl",
"depth": 1,
"n_commands": 0,
"n_lines": 113,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro h₀\n unfold instanceOfType at h₀\n cases v with\n | prim p =>\n cases p with\n | bool b =>\n ca... | [
{
"name": "instance_of_entity_type_refl",
"text": "theorem instance_of_entity_type_refl {e : EntityUID} {ety : EntityType} {env : TypeEnv} :\n instanceOfEntityType e ety env = true → InstanceOfEntityType e ety env\n:= by\n simp only [InstanceOfEntityType, instanceOfEntityType]\n intro h₀\n simp only [Bo... | [
{
"name": "instance_of_request_type_refl",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 4,
"n_lines": 16,
"n_chars": 603,
"n_subproofs": 1,
"n_tactics": 12,
"cyclomatic": 1,
"n_automation": 2,
"n_rewrites": 0,
"n_structural": 7,
"automation_only": false,
... | 4 | import Cedar.Validation.RequestEntityValidator
import Cedar.Validation.EnvironmentValidator
import Cedar.Thm.Validation.EnvironmentValidation
import Cedar.Thm.Validation.Typechecker.Types
import Cedar.Thm.Validation.Validator
namespace Cedar.Thm
open Cedar.Data
open Cedar.Spec
open Cedar.Validation
theorem instance_... | import Cedar.Validation.RequestEntityValidator
import Cedar.Validation.EnvironmentValidator
import Cedar.Thm.Validation.EnvironmentValidation
import Cedar.Thm.Validation.Typechecker.Types
import Cedar.Thm.Validation.Validator
namespace Cedar.Thm
open Cedar.Data
open Cedar.Spec
open Cedar.Validation
theorem instance_... | @@ -17,6 +17,15 @@
intro h₀
cases h₁ : b <;> cases h₂ : bty <;> subst h₁ <;> subst h₂ <;> simp only [Bool.false_eq_true] at *
+theorem instance_of_entity_type_refl {e : EntityUID} {ety : EntityType} {env : TypeEnv} :
+ instanceOfEntityType e ety env = true → InstanceOfEntityType e ety env
+:= by
+ simp only [... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_1f697f957812_2 | e5299782bb9f1189 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Validation/RequestEntityValidation.lean | RequestEntityValidation | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 7 | 2 | [
{
"theorem_name": "instance_of_type_refl",
"depth": 1,
"n_commands": 0,
"n_lines": 113,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro h₀\n unfold instanceOfType at h₀\n cases v with\n | prim p =>\n cases p with\n | bool b =>\n ca... | [
{
"name": "instance_of_entity_type_refl",
"text": "theorem instance_of_entity_type_refl {e : EntityUID} {ety : EntityType} {env : TypeEnv} :\n instanceOfEntityType e ety env = true → InstanceOfEntityType e ety env\n:= by\n simp only [InstanceOfEntityType, instanceOfEntityType]\n intro h₀\n simp only [Bo... | [
{
"name": "instance_of_schema_refl",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 4,
"n_lines": 87,
"n_chars": 3219,
"n_subproofs": 1,
"n_tactics": 92,
"cyclomatic": 31,
"n_automation": 27,
"n_rewrites": 7,
"n_structural": 20,
"automation_only": false,
... | 4 | import Cedar.Validation.RequestEntityValidator
import Cedar.Validation.EnvironmentValidator
import Cedar.Thm.Validation.EnvironmentValidation
import Cedar.Thm.Validation.Typechecker.Types
import Cedar.Thm.Validation.Validator
namespace Cedar.Thm
open Cedar.Data
open Cedar.Spec
open Cedar.Validation
theorem instance_... | import Cedar.Validation.RequestEntityValidator
import Cedar.Validation.EnvironmentValidator
import Cedar.Thm.Validation.EnvironmentValidation
import Cedar.Thm.Validation.Typechecker.Types
import Cedar.Thm.Validation.Validator
namespace Cedar.Thm
open Cedar.Data
open Cedar.Spec
open Cedar.Validation
theorem instance_... | @@ -17,6 +17,15 @@
intro h₀
cases h₁ : b <;> cases h₂ : bty <;> subst h₁ <;> subst h₂ <;> simp only [Bool.false_eq_true] at *
+theorem instance_of_entity_type_refl {e : EntityUID} {ety : EntityType} {env : TypeEnv} :
+ instanceOfEntityType e ety env = true → InstanceOfEntityType e ety env
+:= by
+ simp only [... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_1f697f957812_3 | 927bdf5779820908 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Validation/RequestEntityValidation.lean | RequestEntityValidation | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 7 | 2 | [
{
"theorem_name": "instance_of_type_refl",
"depth": 1,
"n_commands": 0,
"n_lines": 113,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro h₀\n unfold instanceOfType at h₀\n cases v with\n | prim p =>\n cases p with\n | bool b =>\n ca... | [
{
"name": "instance_of_entity_type_refl",
"text": "theorem instance_of_entity_type_refl {e : EntityUID} {ety : EntityType} {env : TypeEnv} :\n instanceOfEntityType e ety env = true → InstanceOfEntityType e ety env\n:= by\n simp only [InstanceOfEntityType, instanceOfEntityType]\n intro h₀\n simp only [Bo... | [
{
"name": "instance_of_well_formed_env",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 6,
"n_lines": 18,
"n_chars": 708,
"n_subproofs": 0,
"n_tactics": 12,
"cyclomatic": 5,
"n_automation": 4,
"n_rewrites": 0,
"n_structural": 7,
"automation_only": false,
... | 6 | import Cedar.Validation.RequestEntityValidator
import Cedar.Validation.EnvironmentValidator
import Cedar.Thm.Validation.EnvironmentValidation
import Cedar.Thm.Validation.Typechecker.Types
import Cedar.Thm.Validation.Validator
namespace Cedar.Thm
open Cedar.Data
open Cedar.Spec
open Cedar.Validation
theorem instance_... | import Cedar.Validation.RequestEntityValidator
import Cedar.Validation.EnvironmentValidator
import Cedar.Thm.Validation.EnvironmentValidation
import Cedar.Thm.Validation.Typechecker.Types
import Cedar.Thm.Validation.Validator
namespace Cedar.Thm
open Cedar.Data
open Cedar.Spec
open Cedar.Validation
theorem instance_... | @@ -17,6 +17,15 @@
intro h₀
cases h₁ : b <;> cases h₂ : bty <;> subst h₁ <;> subst h₂ <;> simp only [Bool.false_eq_true] at *
+theorem instance_of_entity_type_refl {e : EntityUID} {ety : EntityType} {env : TypeEnv} :
+ instanceOfEntityType e ety env = true → InstanceOfEntityType e ety env
+:= by
+ simp only [... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_1f697f957812_4 | 7f4158eedb361a89 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Validation/RequestEntityValidation.lean | RequestEntityValidation | 4 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 7 | 2 | [
{
"theorem_name": "instance_of_type_refl",
"depth": 1,
"n_commands": 0,
"n_lines": 113,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n intro h₀\n unfold instanceOfType at h₀\n cases v with\n | prim p =>\n cases p with\n | bool b =>\n ca... | [
{
"name": "instance_of_entity_type_refl",
"text": "theorem instance_of_entity_type_refl {e : EntityUID} {ety : EntityType} {env : TypeEnv} :\n instanceOfEntityType e ety env = true → InstanceOfEntityType e ety env\n:= by\n simp only [InstanceOfEntityType, instanceOfEntityType]\n intro h₀\n simp only [Bo... | [
{
"name": "request_and_entities_validate_implies_instance_of_wf_schema",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 7,
"n_lines": 21,
"n_chars": 1010,
"n_subproofs": 0,
"n_tactics": 15,
"cyclomatic": 1,
"n_automation": 7,
"n_rewrites": 0,
"n_structural": 4,... | 7 | import Cedar.Validation.RequestEntityValidator
import Cedar.Validation.EnvironmentValidator
import Cedar.Thm.Validation.EnvironmentValidation
import Cedar.Thm.Validation.Typechecker.Types
import Cedar.Thm.Validation.Validator
namespace Cedar.Thm
open Cedar.Data
open Cedar.Spec
open Cedar.Validation
theorem instance_... | import Cedar.Validation.RequestEntityValidator
import Cedar.Validation.EnvironmentValidator
import Cedar.Thm.Validation.EnvironmentValidation
import Cedar.Thm.Validation.Typechecker.Types
import Cedar.Thm.Validation.Validator
namespace Cedar.Thm
open Cedar.Data
open Cedar.Spec
open Cedar.Validation
theorem instance_... | @@ -17,6 +17,15 @@
intro h₀
cases h₁ : b <;> cases h₂ : bty <;> subst h₁ <;> subst h₂ <;> simp only [Bool.false_eq_true] at *
+theorem instance_of_entity_type_refl {e : EntityUID} {ety : EntityType} {env : TypeEnv} :
+ instanceOfEntityType e ety env = true → InstanceOfEntityType e ety env
+:= by
+ simp only [... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_255fff183c87_0 | 0f096ead9fc53a56 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/List/Canonical.lean | Canonical | 0 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 2 | [
{
"theorem_name": "insertCanonical_subset",
"depth": 1,
"n_commands": 0,
"n_lines": 12,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n induction xs\n case nil => simp only [insertCanonical, Subset.refl]\n case cons hd tl ih =>\n rcases (insertCa... | [
{
"name": "insertCanonical_cases",
"text": "theorem insertCanonical_cases [LT β] [DecidableLT β] (f : α → β) (x y : α) (ys : List α) :\n (f x < f y ∧ insertCanonical f x (y :: ys) = x :: y :: ys) ∨\n (¬ f x < f y ∧ f x > f y ∧ insertCanonical f x (y :: ys) = y :: insertCanonical f x ys) ∨\n (¬ f x < f y ... | [
{
"name": "insertCanonical_subset",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 16,
"n_chars": 761,
"n_subproofs": 0,
"n_tactics": 12,
"cyclomatic": 3,
"n_automation": 5,
"n_rewrites": 0,
"n_structural": 5,
"automation_only": false,
"ma... | 1 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -34,9 +34,37 @@
/-! ### insertCanonical -/
+theorem insertCanonical_cases [LT β] [DecidableLT β] (f : α → β) (x y : α) (ys : List α) :
+ (f x < f y ∧ insertCanonical f x (y :: ys) = x :: y :: ys) ∨
+ (¬ f x < f y ∧ f x > f y ∧ insertCanonical f x (y :: ys) = y :: insertCanonical f x ys) ∨
+ (¬ f x < f y ∧ ¬ ... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_255fff183c87_1 | 0fca68a1ae9a2cd5 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/List/Canonical.lean | Canonical | 1 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 2 | [
{
"theorem_name": "insertCanonical_subset",
"depth": 1,
"n_commands": 0,
"n_lines": 12,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n induction xs\n case nil => simp only [insertCanonical, Subset.refl]\n case cons hd tl ih =>\n rcases (insertCa... | [
{
"name": "insertCanonical_cases",
"text": "theorem insertCanonical_cases [LT β] [DecidableLT β] (f : α → β) (x y : α) (ys : List α) :\n (f x < f y ∧ insertCanonical f x (y :: ys) = x :: y :: ys) ∨\n (¬ f x < f y ∧ f x > f y ∧ insertCanonical f x (y :: ys) = y :: insertCanonical f x ys) ∨\n (¬ f x < f y ... | [
{
"name": "insertCanonical_equiv",
"fan_in": 1,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 57,
"n_chars": 1969,
"n_subproofs": 4,
"n_tactics": 56,
"cyclomatic": 9,
"n_automation": 13,
"n_rewrites": 6,
"n_structural": 13,
"automation_only": false,
"... | 2 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -38,9 +38,78 @@
insertCanonical f x [] = [x]
:= by unfold insertCanonical; rfl
+theorem insertCanonical_cases [LT β] [DecidableLT β] (f : α → β) (x y : α) (ys : List α) :
+ (f x < f y ∧ insertCanonical f x (y :: ys) = x :: y :: ys) ∨
+ (¬ f x < f y ∧ f x > f y ∧ insertCanonical f x (y :: ys) = y :: insertCan... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_255fff183c87_2 | 00770fc243dcdfc8 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/List/Canonical.lean | Canonical | 2 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 2 | [
{
"theorem_name": "insertCanonical_equiv",
"depth": 1,
"n_commands": 0,
"n_lines": 53,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n unfold insertCanonical\n induction xs\n case nil => simp only ; exact Equiv.refl\n case cons hd tl ih =>\n sim... | [
{
"name": "insertCanonical_singleton",
"text": "public theorem insertCanonical_singleton [LT β] [DecidableLT β] (f : α → β) (x : α) :\n insertCanonical f x [] = [x]\n:= by unfold insertCanonical; rfl\n\n",
"fan_in": 2,
"n_lines": 5,
"n_chars": 160,
"n_subproofs": 0,
"n_tactics": 2,
... | [
{
"name": "insertCanonical_preserves_forall",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 31,
"n_chars": 1304,
"n_subproofs": 1,
"n_tactics": 27,
"cyclomatic": 10,
"n_automation": 6,
"n_rewrites": 1,
"n_structural": 13,
"automation_only": f... | 1 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -34,12 +34,39 @@
/-! ### insertCanonical -/
+public theorem insertCanonical_singleton [LT β] [DecidableLT β] (f : α → β) (x : α) :
+ insertCanonical f x [] = [x]
+:= by unfold insertCanonical; rfl
+
public theorem insertCanonical_preserves_forallᵥ {α β γ} [LT α] [StrictLT α] [DecidableLT α] {p : β → γ → Prop... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_255fff183c87_3 | fef9efe7af932287 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/List/Canonical.lean | Canonical | 3 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 1 | [
{
"theorem_name": "insertCanonical_map_fst_canonicalize",
"depth": 1,
"n_commands": 0,
"n_lines": 6,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n induction xs generalizing x\n case nil => simp [insertCanonical, canonicalize, Prod.map]\n case cons... | [
{
"name": "insertCanonical_map_fst",
"text": "public theorem insertCanonical_map_fst {α β γ} [LT α] [StrictLT α] [DecidableLT α] (xs : List (α × β)) (f : β → γ) (x : α × β) :\n insertCanonical Prod.fst (Prod.map id f x) (map (Prod.map id f) xs) =\n map (Prod.map id f) (insertCanonical Prod.fst x xs)\n:= b... | [
{
"name": "insertCanonical_map_fst_canonicalize",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 13,
"n_chars": 615,
"n_subproofs": 0,
"n_tactics": 6,
"cyclomatic": 2,
"n_automation": 2,
"n_rewrites": 0,
"n_structural": 2,
"automation_only": f... | 1 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -34,10 +34,31 @@
/-! ### insertCanonical -/
+public theorem insertCanonical_map_fst {α β γ} [LT α] [StrictLT α] [DecidableLT α] (xs : List (α × β)) (f : β → γ) (x : α × β) :
+ insertCanonical Prod.fst (Prod.map id f x) (map (Prod.map id f) xs) =
+ map (Prod.map id f) (insertCanonical Prod.fst x xs)
+:= by
+ ... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_255fff183c87_4 | dc621e18da7ebc2b | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/List/Canonical.lean | Canonical | 4 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 4 | [
{
"theorem_name": "canonicalize_nil'",
"depth": 1,
"n_commands": 0,
"n_lines": 14,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n constructor\n case mp =>\n intro h₁ ; subst h₁\n exact canonicalize_nil f\n case mpr =>\n intro h₁\n cases... | [
{
"name": "canonicalize_nil",
"text": "public theorem canonicalize_nil [LT β] [DecidableLT β] (f : α → β) :\n canonicalize f [] = []\n:= by unfold canonicalize; rfl\n\n",
"fan_in": 4,
"n_lines": 5,
"n_chars": 132,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation"... | [
{
"name": "canonicalize_nil'",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 18,
"n_chars": 450,
"n_subproofs": 0,
"n_tactics": 15,
"cyclomatic": 3,
"n_automation": 1,
"n_rewrites": 2,
"n_structural": 7,
"automation_only": false,
"max_nes... | 2 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -46,9 +46,26 @@
split at h <;> try trivial
split at h <;> trivial
+public theorem canonicalize_nil [LT β] [DecidableLT β] (f : α → β) :
+ canonicalize f [] = []
+:= by unfold canonicalize; rfl
+
public theorem canonicalize_nil' [DecidableEq β] [LT β] [DecidableLT β] (f : α → β) (xs : List α) :
xs = ... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_255fff183c87_5 | cc1dfe0e76bf6305 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/List/Canonical.lean | Canonical | 5 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 2 | [
{
"theorem_name": "canonicalize_nil'",
"depth": 1,
"n_commands": 0,
"n_lines": 14,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n constructor\n case mp =>\n intro h₁ ; subst h₁\n exact canonicalize_nil f\n case mpr =>\n intro h₁\n cases... | [
{
"name": "insertCanonical_not_nil",
"text": "public theorem insertCanonical_not_nil [DecidableEq β] [LT β] [DecidableLT β] (f : α → β) (x : α) (xs : List α) :\n insertCanonical f x xs ≠ []\n:= by\n unfold insertCanonical\n cases xs\n case nil => simp only [ne_eq, cons_ne_self, not_false_eq_true]\n cas... | [
{
"name": "canonicalize_not_nil",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 1,
"n_lines": 17,
"n_chars": 475,
"n_subproofs": 0,
"n_tactics": 14,
"cyclomatic": 5,
"n_automation": 1,
"n_rewrites": 2,
"n_structural": 6,
"automation_only": false,
"max_... | 1 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -34,6 +34,18 @@
/-! ### insertCanonical -/
+public theorem insertCanonical_not_nil [DecidableEq β] [LT β] [DecidableLT β] (f : α → β) (x : α) (xs : List α) :
+ insertCanonical f x xs ≠ []
+:= by
+ unfold insertCanonical
+ cases xs
+ case nil => simp only [ne_eq, cons_ne_self, not_false_eq_true]
+ case cons... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_255fff183c87_6 | fafabf93e93a00e9 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/List/Canonical.lean | Canonical | 6 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 4 | [
{
"theorem_name": "canonicalize_nil'",
"depth": 1,
"n_commands": 0,
"n_lines": 14,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n constructor\n case mp =>\n intro h₁ ; subst h₁\n exact canonicalize_nil f\n case mpr =>\n intro h₁\n cases... | [
{
"name": "canonicalize_nil",
"text": "public theorem canonicalize_nil [LT β] [DecidableLT β] (f : α → β) :\n canonicalize f [] = []\n:= by unfold canonicalize; rfl\n\n",
"fan_in": 4,
"n_lines": 5,
"n_chars": 132,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation"... | [
{
"name": "canonicalize_sortedBy",
"fan_in": 3,
"n_deps_direct": 2,
"n_deps_transitive": 2,
"n_lines": 11,
"n_chars": 312,
"n_subproofs": 0,
"n_tactics": 7,
"cyclomatic": 2,
"n_automation": 1,
"n_rewrites": 1,
"n_structural": 3,
"automation_only": false,
"max_... | 2 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -73,9 +73,19 @@
case cons_nil => exact SortedBy.cons_nil
case cons_cons h₅ h₆ => exact SortedBy.cons_cons (by simp only [h₄, h₆]) h₅
+public theorem canonicalize_nil [LT β] [DecidableLT β] (f : α → β) :
+ canonicalize f [] = []
+:= by unfold canonicalize; rfl
+
public theorem canonicalize_sorte... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_255fff183c87_7 | 2cf7d4e3956d0fe8 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/List/Canonical.lean | Canonical | 7 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 2 | [
{
"theorem_name": "insertCanonical_subset",
"depth": 1,
"n_commands": 0,
"n_lines": 12,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n induction xs\n case nil => simp only [insertCanonical, Subset.refl]\n case cons hd tl ih =>\n rcases (insertCa... | [
{
"name": "insertCanonical_cases",
"text": "theorem insertCanonical_cases [LT β] [DecidableLT β] (f : α → β) (x y : α) (ys : List α) :\n (f x < f y ∧ insertCanonical f x (y :: ys) = x :: y :: ys) ∨\n (¬ f x < f y ∧ f x > f y ∧ insertCanonical f x (y :: ys) = y :: insertCanonical f x ys) ∨\n (¬ f x < f y ... | [
{
"name": "canonicalize_subseteq",
"fan_in": 1,
"n_deps_direct": 1,
"n_deps_transitive": 2,
"n_lines": 12,
"n_chars": 427,
"n_subproofs": 1,
"n_tactics": 9,
"cyclomatic": 3,
"n_automation": 3,
"n_rewrites": 0,
"n_structural": 3,
"automation_only": false,
"max_... | 2 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -34,9 +34,37 @@
/-! ### insertCanonical -/
+theorem insertCanonical_cases [LT β] [DecidableLT β] (f : α → β) (x y : α) (ys : List α) :
+ (f x < f y ∧ insertCanonical f x (y :: ys) = x :: y :: ys) ∨
+ (¬ f x < f y ∧ f x > f y ∧ insertCanonical f x (y :: ys) = y :: insertCanonical f x ys) ∨
+ (¬ f x < f y ∧ ¬ ... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_255fff183c87_8 | d6a7df09a43f76fd | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/List/Canonical.lean | Canonical | 8 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 1 | [
{
"theorem_name": "canonicalize_subseteq",
"depth": 1,
"n_commands": 0,
"n_lines": 8,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n induction xs <;> simp only [canonicalize, Subset.refl]\n case cons hd tl ih =>\n have h := insertCanonical_subset... | [
{
"name": "insertCanonical_subset",
"text": "public theorem insertCanonical_subset [LT β] [DecidableLT β] (f : α → β) (x : α) (xs : List α) :\n insertCanonical f x xs ⊆ x :: xs\n:= by\n induction xs\n case nil => simp only [insertCanonical, Subset.refl]\n case cons hd tl ih =>\n rcases (insertCanonic... | [
{
"name": "in_canonicalize_in_list",
"fan_in": 0,
"n_deps_direct": 1,
"n_deps_transitive": 3,
"n_lines": 15,
"n_chars": 504,
"n_subproofs": 1,
"n_tactics": 5,
"cyclomatic": 1,
"n_automation": 1,
"n_rewrites": 0,
"n_structural": 2,
"automation_only": false,
"ma... | 3 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -51,9 +51,31 @@
case pos _ _ h₃ => simp [h₃, h₁]
case neg _ _ h₃ => simp [h₃]
+public theorem insertCanonical_subset [LT β] [DecidableLT β] (f : α → β) (x : α) (xs : List α) :
+ insertCanonical f x xs ⊆ x :: xs
+:= by
+ induction xs
+ case nil => simp only [insertCanonical, Subset.refl]
+ case cons h... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_255fff183c87_9 | eda4fb31a59925e5 | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/List/Canonical.lean | Canonical | 9 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 4 | [
{
"theorem_name": "canonicalize_nil'",
"depth": 1,
"n_commands": 0,
"n_lines": 14,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n constructor\n case mp =>\n intro h₁ ; subst h₁\n exact canonicalize_nil f\n case mpr =>\n intro h₁\n cases... | [
{
"name": "canonicalize_nil",
"text": "public theorem canonicalize_nil [LT β] [DecidableLT β] (f : α → β) :\n canonicalize f [] = []\n:= by unfold canonicalize; rfl\n\n",
"fan_in": 4,
"n_lines": 5,
"n_chars": 132,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation"... | [
{
"name": "canonicalize_equiv",
"fan_in": 2,
"n_deps_direct": 2,
"n_deps_transitive": 4,
"n_lines": 19,
"n_chars": 565,
"n_subproofs": 1,
"n_tactics": 11,
"cyclomatic": 2,
"n_automation": 2,
"n_rewrites": 1,
"n_structural": 4,
"automation_only": false,
"max_ne... | 4 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -111,9 +111,23 @@
apply cons_equiv_cons
exact ih
+public theorem canonicalize_nil [LT β] [DecidableLT β] (f : α → β) :
+ canonicalize f [] = []
+:= by unfold canonicalize; rfl
+
public theorem canonicalize_equiv [LT α] [StrictLT α] [DecidableLT α] (xs : List α) :
xs ≡ canonicaliz... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
ablate_255fff183c87_10 | 3827e56d3e8d4dcb | lean | lean | github.com/cedar-policy/cedar-spec | 795ddccff61c83aeb5d6a7ccd22abf5e00164c73 | cedar-lean/Cedar/Thm/Data/List/Canonical.lean | Canonical | 10 | lemma_delete | null | null | false | 0.5 | 1 | 1 | false | 0 | inf | 0 | inf | 42 | 14 | 4 | [
{
"theorem_name": "canonicalize_nil'",
"depth": 1,
"n_commands": 0,
"n_lines": 14,
"is_leaf": true,
"centrality": 0,
"method": "deleted-dep",
"proof_text": " by\n constructor\n case mp =>\n intro h₁ ; subst h₁\n exact canonicalize_nil f\n case mpr =>\n intro h₁\n cases... | [
{
"name": "canonicalize_nil",
"text": "public theorem canonicalize_nil [LT β] [DecidableLT β] (f : α → β) :\n canonicalize f [] = []\n:= by unfold canonicalize; rfl\n\n",
"fan_in": 4,
"n_lines": 5,
"n_chars": 132,
"n_subproofs": 0,
"n_tactics": 2,
"cyclomatic": 1,
"n_automation"... | [
{
"name": "equiv_implies_canonical_eq",
"fan_in": 0,
"n_deps_direct": 2,
"n_deps_transitive": 7,
"n_lines": 16,
"n_chars": 495,
"n_subproofs": 2,
"n_tactics": 12,
"cyclomatic": 1,
"n_automation": 0,
"n_rewrites": 0,
"n_structural": 9,
"automation_only": false,
... | 7 | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | /-
Copyright Cedar Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | @@ -150,13 +150,33 @@
apply cons_equiv_cons
exact ih
+public theorem canonicalize_nil [LT β] [DecidableLT β] (f : α → β) :
+ canonicalize f [] = []
+:= by unfold canonicalize; rfl
+
public theorem canonicalize_sortedBy [LT β] [StrictLT β] [DecidableLT β] (f : α → β) (xs : List α) :
... | {
"repo": "cedar-spec",
"git_repo": "github.com/cedar-policy/cedar-spec",
"revision": "795ddccff61c83aeb5d6a7ccd22abf5e00164c73",
"lean_toolchain": "leanprover/lean4:v4.31.0",
"proof_assistant": "lean",
"ablator": "ablators/lean (corollary-delete-lemmas-leaves-all)",
"ablator_flags": [
"--corollary-de... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.