File tree Expand file tree Collapse file tree
RelationalAlgebra/Equivalence Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ variable {ρ α μ : Type} {dbi : DatabaseInstance ρ α μ} [LinearOrder α] [F
2525
2626/-- Query evaluation equivalence for a set of tuples -/
2727theorem toFOL.evalT_def (h : RA.Query.isWellTyped dbi.schema raQ) :
28- (toFOL dbi.schema raQ).evaluateT dbi = RA.Query. evaluateT dbi raQ := by
28+ (toFOL dbi.schema raQ).evaluateT dbi = raQ. evaluateT dbi := by
2929 induction raQ with
3030 | R rn => exact toFOL.evalT_def.R_def_eq h
3131 | s a b sq ih => exact toFOL.evalT_def.s_def_eq h (ih h.1 )
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ Map an attribute `ra` (part of the schema for relation `rn`) to the correspondin
5353Note: `ra` should be in schema `dbs rn` and `brs` should be disjoint from the free variables
5454-/
5555def renamer (ts : Fin (dbs rn).card → (fol dbs).Term (α ⊕ Fin n)) (brs : Finset α) (ra : α) : α :=
56- ((RelationSchema.index? (dbs rn) ra).map (TermtoAtt brs ∘ ts)).getD ( default)
56+ ((RelationSchema.index? (dbs rn) ra).map (TermtoAtt brs ∘ ts)).getD default
5757
5858theorem renamer.notMem_def {ts : Fin (dbs rn).card → (fol dbs).Term (α ⊕ Fin n)} (h : ra ∉ dbs rn) :
5959 renamer ts brs ra = default := by
You can’t perform that action at this time.
0 commit comments