PAIRED_BETA_CONV : conv
<vs> ::= (v1,v2) | (<vs>,v) | (v,<vs>) | (<vs>,<vs>)
(\((a,b),(c,d)). a + b + c + d) ((1,2),(3,4))
(\((a,b),(c,d)). a + b + c + d) ((1,2),p)
Given a tupled beta-redex (\<vs>.tm) t, the conversion PAIRED_BETA_CONV performs generalized beta-reduction and returns the theorem
|- (\<vs>.tm) t = t[t1,...,tn/v1,...,vn]
(\(v1,...,vn).t) (t1,...,tn)
|- (\(v1, ... ,vn).t) (t1, ... ,tn) = t[t1,...,tn/v1,...,vn]
- PairedLambda.PAIRED_BETA_CONV (Term `(\((a,b),(c,d)). a + b + c + d) ((1,2),(3,4))`); > val it = |- (\((a,b),c,d). a+b+c+d) ((1,2),3,4) = 1+2+3+4 : thm
- PairedLambda.PAIRED_BETA_CONV (Term `(\((a,b),p). a + b) ((1,2),(3+5,4))`); > val it = |- (\((a,b),p). a + b)((1,2),3 + 5,4) = 1 + 2 : thm
- PairedLambda.PAIRED_BETA_CONV (Term `(\((a,b),(c,d)). a + b + c + d) ((1,2),p)`); ! Uncaught exception: ! HOL_ERR