Skip to content

Commit

Permalink
more cleaning, renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
siddhartha-gadgil committed Mar 13, 2024
1 parent 24b5008 commit 79f1cc8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 6 additions & 6 deletions Saturn/Containment.lean
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def varDomDecide : (v1 : Option Bool) → (v2 : Option Bool) → Decidable (v1
def contains{n: Nat} (cl1 cl2 : Clause n) : Prop :=
∀ k : Nat, ∀ kw : k < n, ∀ b : Bool, cl2.get' k kw = some b → cl1.get' k kw = some b

infix:65 "" => contains
infix:65 "" => contains

theorem contains_refl{n: Nat} (cl : Clause n) :
cl ⊇ cl := fun _ _ _ hyp => hyp
Expand Down Expand Up @@ -82,12 +82,12 @@ abbrev containsBeyond(cl1 cl2 : Clause n)(m: Nat) : Prop :=
∀ k : Nat, ∀ kw : k < n, m ≤ k → ∀ b : Bool, cl2.get' k kw = some b → cl1.get' k kw = some b

theorem contains_implies_contains_beyond {n: Nat} (cl1 cl2 : Clause n) (m: Nat) :
contains cl1 cl2 → containsBeyond cl1 cl2 m := by
cl1 cl2 → containsBeyond cl1 cl2 m := by
intro h k kw _ b
exact h k kw b

theorem contains_beyond_zero_implies_contains {n: Nat} (cl1 cl2 : Clause n) :
containsBeyond cl1 cl2 zero → contains cl1 cl2 := by
containsBeyond cl1 cl2 zero → cl1 cl2 := by
intro h k kw b
exact h k kw (Nat.zero_le _) b

Expand All @@ -108,7 +108,7 @@ theorem contains_beyond_vacuously{n: Nat} (cl1 cl2 : Clause n)(m: Nat) :
exact (False.elim (Nat.lt_irrefl k inq2))

def decideContainsRec{n: Nat} (cl1 cl2 : Clause n) :
(m: Nat) → Decidable (containsBeyond cl1 cl2 m) → Decidable (contains cl1 cl2) :=
(m: Nat) → Decidable (containsBeyond cl1 cl2 m) → Decidable (cl1 cl2) :=
fun m dContainsBeyond =>
match m, dContainsBeyond with
| m, isFalse contra => isFalse (
Expand Down Expand Up @@ -213,7 +213,7 @@ def identity{num_clauses n : Nat}(base: Vector (Clause n) num_clauses) : Contain
apply witness_independent
rw [idAt]
let baseContains : (j : Nat) → (jw : j < num_clauses) →
contains (base.get' j jw) (base.get' (idVec.get' j jw) (idBound j jw)) := by
(base.get' j jw) (base.get' (idVec.get' j jw) (idBound j jw)) := by
intro j jw
rw [baseEqn]
exact contains_refl (base.get' j jw)
Expand Down Expand Up @@ -312,7 +312,7 @@ def simplifyNonEmptyContainment{d n : Nat}: (cursorBound : Nat) →
apply witness_independent
rw [forwardNAt]
have forwardNPred : (j : Nat) → (jw : j < domN) →
contains (base.get' j jw)
(base.get' j jw)
((Vector.ofFn' imageSeqN).get' (forwardNVec.get' j jw) (forwardNBound j jw)) :=
by
intro j jw
Expand Down
2 changes: 0 additions & 2 deletions Saturn/Core.lean
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import Mathlib.Data.Vector
open Nat


/-!
## SATurn Core
Expand Down

0 comments on commit 79f1cc8

Please sign in to comment.