File size: 2,200 Bytes
2f887db | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | import OAI.Computability.PerfectCompleteness.Foundations.SourceOddListsLemmas
namespace OAI
section
namespace PerfectCompleteness.NativeLeafAlphabet
open SourceClause
variable {I : Type*} {v m t : Nat}
def castAssignment {a b : I → MixedSupport.Slot} (h : a = b) :
MixedSupport.Assignment a ≃ MixedSupport.Assignment b :=
Equiv.cast (congrArg (fun slots : I → MixedSupport.Slot =>
MixedSupport.Assignment slots) h)
@[simp] theorem castAssignment_rfl (a : I → MixedSupport.Slot) :
castAssignment (rfl : a = a) = Equiv.refl (MixedSupport.Assignment a) := rfl
def nativeLeftEquiv (clauses : Fin m → NormalizedClause v)
(question : Fin t → Fin m) {a : Fin t → MixedSupport.Slot}
(ha : a = SourceAnswerEquiv.leftSlots clauses question) :
MixedSupport.Assignment a ≃ SourceOddLists.LeftLabels t :=
(castAssignment ha).trans (SourceAnswerEquiv.leftEquiv clauses question)
def nativeRightEquiv (clauses : Fin m → NormalizedClause v)
(question : Fin t → Fin v) {b : Fin t → MixedSupport.Slot}
(hb : b = SourceAnswerEquiv.rightSlots clauses question) :
MixedSupport.Assignment b ≃ SourceOddLists.RightLabels t :=
(castAssignment hb).trans (SourceAnswerEquiv.rightEquiv clauses question)
theorem projection_encode (clauses : Fin m → NormalizedClause v)
(e : SourceOddLists.Occurrences m t) {a b : Fin t → MixedSupport.Slot}
(ha : a = SourceAnswerEquiv.leftSlots clauses (SourceOddLists.left e))
(hb : b = SourceAnswerEquiv.rightSlots clauses (SourceOddLists.right clauses e))
(q : ∀ k, MixedSupport.Projection (a k) (b k))
(hq : ∀ k, HEq (q k) (SourceAnswerEquiv.slotProjection clauses e k))
(x : MixedSupport.Assignment a) :
nativeRightEquiv clauses (SourceOddLists.right clauses e) hb
(MixedSupport.projectionMap q x) =
SourceOddLists.projection clauses e
(nativeLeftEquiv clauses (SourceOddLists.left e) ha x) := by
subst a
subst b
have hprojection : q = SourceAnswerEquiv.slotProjection clauses e := by
funext k
exact eq_of_heq (hq k)
subst q
exact SourceAnswerEquiv.projection_encode clauses e x
end PerfectCompleteness.NativeLeafAlphabet
end
end OAI
|