You can edit almost every page by Creating an account and confirming your email.

Fresh variable

From EverybodyWiki Bios & Wiki


In formal reasoning, in particular in mathematical logic, computer algebra, and automated theorem proving, a fresh variable is a variable that has not occurred in the context considered so far.[1][citation needed] The concept is often used without explanation.[2][citation needed]

Example

For example, in term rewriting, before applying a rule l→r to a given term t, each variable in l→r should be replaced by a fresh one to avoid clashes with variables occurring in t.[citation needed] Given the rule

append(cons(x,y),z)→cons(x,append(y,z))

and the term

append(cons(x,cons(y,nil)),cons(3,nil)),

attempting to find a matching substitution of the rule's left-hand side, append(cons(x,y),z), within append(cons(x,cons(y,nil)),cons(3,nil)) will fail, since y cannot match cons(y,nil). However, if the rule is replaced by a fresh copy[lower-alpha 1]

append(cons(v1,v2),v3)→cons(v1,append(v2,v3))

before, matching will succeed with the answer substitution {v1↦x,v2↦cons(y,nil),v3↦cons(3,nil)}.

Notes

  1. ↑ that is, a copy with each variable consistently replaced by a fresh variable

References

  1. ↑ Carmen Bruni (2018). Predicate Logic: Natural Deduction (PDF) (Lecture Slides). Univ. of Waterloo. Here: slide 13/26.
  2. ↑ Michael Färber (Feb 2023). Denotational Semantics and a Fast Interpreter for jq (Technical Report). Univ. of Innsbruck. arXiv:2302.10576. Here: p.4.


This article "Fresh variable" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:Fresh variable. Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.