Direct word equality at the original resource bounds #
Plain word leaves feed a reachable-prefix fold. Both encoded inputs are charged, with the original product time bound and linear workspace bound; no higher tidy calculus is imported.
Equality of words, within the length of the first word times the length of both, and linear space.
Equality, for any encoding.
theorem Turing.MultiTapeTM.ComputableInPolyTime.decide_eq' {α β : Type} {encA : α ↪ List Bool} {encB : β ↪ List Bool} [_inst4 : DecidableEq β] {left right : α → β} (hleft : ComputableInPolyTime left encA encB) (hright : ComputableInPolyTime right encA encB) :
ComputableInPolyTime (fun (x : α) => decide (left x = right x)) encA encBool
Compare computed values for equality, inferring their common encoding from the arguments.
theorem Turing.MultiTapeTM.ComputableInPolyTime.beq {α β : Type} {encA : α ↪ List Bool} {encB : β ↪ List Bool} [BEq β] [LawfulBEq β] {left right : α → β} (hleft : ComputableInPolyTime left encA encB) (hright : ComputableInPolyTime right encA encB) :
ComputableInPolyTime (fun (x : α) => left x == right x) encA encBool
Lawful Boolean equality compares computed values through their common encoding.