Skip to content
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.

Commit

Permalink
refactor: final refactor of CNF.Relabel
Browse files Browse the repository at this point in the history
  • Loading branch information
hargoniX committed Aug 6, 2024
1 parent 6c73f54 commit 714eceb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions LeanSAT/CNF/Relabel.lean
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ namespace CNF

namespace Clause

/--
Change the literal type in a `Clause` from `α` to `β` by using `f`.
-/
def relabel (f : α → β) (c : Clause α) : Clause β := c.map (fun (i, n) => (f i, n))

@[simp] theorem eval_relabel {f : α → β} {g : β → Bool} {x : Clause α} :
Expand Down Expand Up @@ -43,6 +46,9 @@ It is convenient to be able to construct a CNF using a more complicated literal
but eventually we need to embed in `Nat`.
-/

/--
Change the literal type in a `CNF` formula from `α` to `β` by using `f`.
-/
def relabel (f : α → β) (g : CNF α) : CNF β := g.map (Clause.relabel f)

@[simp] theorem eval_relabel (f : α → β) (g : β → Bool) (x : CNF α) :
Expand Down

0 comments on commit 714eceb

Please sign in to comment.