Entry |
Value |
Name |
zip_unzip |
Conclusion |
!l xs ys. unzip l = xs,ys <=> LENGTH xs = LENGTH ys /\ l = zip xs ys |
Constructive Proof |
No |
Axiom |
!t. t \/ ~t
(\a. a = (\b. (\c. c) = (\c. c))) (\d. (\e. d e) = d)
(\a. a = (\b. (\c. c) = (\c. c)))
(\d. (\e. e = (\f. (\c. c) = (\c. c)))
(\g. (\h i.
(\j k.
(\l. l j k) =
(\m. m ((\c. c) = (\c. c)) ((\c. c) = (\c. c))))
h
i <=>
h)
(d g)
(d ((@) d))))
(\a. (\b. b = (\c. (\d. d) = (\d. d)))
(\e. (\f g.
(\h i.
(\j. j h i) =
(\k. k ((\d. d) = (\d. d)) ((\d. d) = (\d. d))))
f
g <=>
f)
((\l. l = (\m. (\d. d) = (\d. d)))
(\n. (\f g.
(\h i.
(\j. j h i) =
(\k. k ((\d. d) = (\d. d)) ((\d. d) = (\d. d))))
f
g <=>
f)
(a n)
e))
e))
(\p. (\h i. (\j. j h i) = (\k. k ((\d. d) = (\d. d)) ((\d. d) = (\d. d))))
((\q. q = (\r. (\d. d) = (\d. d)))
(\s. (\q. q = (\r. (\d. d) = (\d. d)))
(\t. (\f g.
(\h i.
(\j. j h i) =
(\k. k ((\d. d) = (\d. d)) ((\d. d) = (\d. d))))
f
g <=>
f)
(p s = p t)
(s = t))))
((\u. (\f g.
(\h i.
(\j. j h i) =
(\k. k ((\d. d) = (\d. d)) ((\d. d) = (\d. d))))
f
g <=>
f)
u
((\b. b = (\c. (\d. d) = (\d. d))) (\d. d)))
((\q. q = (\r. (\d. d) = (\d. d)))
(\v. (\w. (\b. b = (\c. (\d. d) = (\d. d)))
(\x. (\f g.
(\h i.
(\j. j h i) =
(\k. k ((\d. d) = (\d. d)) ((\d. d) = (\d. d))))
f
g <=>
f)
((\q. q = (\r. (\d. d) = (\d. d)))
(\y. (\f g.
(\h i.
(\j. j h i) =
(\k. k ((\d. d) = (\d. d))
((\d. d) = (\d. d))))
f
g <=>
f)
(w y)
x))
x))
(\z. v = p z))))) |
Classical Lemmas |
!h1 h2 t1 t2. CONS h1 t1 = CONS h2 t2 <=> h1 = h2 /\ t1 = t2!a b a' b'. a,b = a',b' <=> a = a' /\ b = b'!a b. FST (a,b) = a!a b. SND (a,b) = b!e f. ?!fn. fn _0 = e /\ (!n. fn (SUC n) = f (fn n) n)!h t. ~(CONS h t = [])!b f. ?fn. fn [] = b /\ (!h t. fn (CONS h t) = f h t (fn t))!t1 t2. ~(t1 /\ t2) <=> ~t1 \/ ~t2!t1 t2. ~(t1 ==> t2) <=> t1 /\ ~t2!t1 t2. ~(t1 \/ t2) <=> ~t1 /\ ~t2!t. ~ ~t <=> t!t. (t <=> T) \/ (t <=> F)!p q. (!x. p x \/ q) <=> (!x. p x) \/ q!p q. (!x. p x) \/ q <=> (!x. p x \/ q)!p. (?x. ~p x) <=> ~(!x. p x)!p. ~(!x. p x) <=> (?x. ~p x)!p. ~(?x. p x) <=> (!x. ~p x)!f. ?fn. !a b. fn (a,b) = f a b!l xs. unzip l = xs,[] <=> l = [] /\ xs = []!l ys. unzip l = [],ys <=> l = [] /\ ys = []!m n p. m + n = m + p <=> n = p!m n. ~(m <= n) <=> n < m!m n. m <= n /\ n <= m <=> m = n!m n. m < n <=> (?d. n = m + SUC d)!m n. SUC m < SUC n <=> m < n!m n. SUC m <= n <=> m < n!m n. SUC m <= SUC n <=> m <= n!m n. SUC m = SUC n <=> m = n!n. ~(SUC n = _0)!n. BIT0 (SUC n) = SUC (SUC (BIT0 n))!h x y t xs ys.
unzip (CONS h t) = CONS x xs,CONS y ys <=> h = x,y /\ unzip t = xs,ysBIT0 0 = 0 |
Constructive Lemmas |
T!h1 h2 t1 t2. CONS h1 t1 = CONS h2 t2 <=> h1 = h2 /\ t1 = t2!t1 t2. (if F then t1 else t2) = t2!t1 t2. (if T then t1 else t2) = t1!x y. x = y <=> y = x!x y. x = y ==> y = x!a b a' b'. a,b = a',b' <=> a = a' /\ b = b'!x y xs ys.
LENGTH xs = LENGTH ys
==> zip (CONS x xs) (CONS y ys) = CONS (x,y) (zip xs ys)!a b. FST (a,b) = a!a b. SND (a,b) = b!e f. ?!fn. fn _0 = e /\ (!n. fn (SUC n) = f (fn n) n)!h t. ~(CONS h t = [])!h t. HD (CONS h t) = h!h t. TL (CONS h t) = t!h t. LENGTH (CONS h t) = SUC (LENGTH t)!a. ?x. x = a!a. ?!x. x = a!x. x = x!x. (@y. y = x) = x!b f. ?fn. fn [] = b /\ (!h t. fn (CONS h t) = f h t (fn t))!p1 p2 q1 q2. (p1 ==> p2) /\ (q1 ==> q2) ==> p1 /\ q1 ==> p2 /\ q2!p1 p2 q1 q2. (p1 ==> p2) /\ (q1 ==> q2) ==> p1 \/ q1 ==> p2 \/ q2!t1 t2 t3. (t1 /\ t2) /\ t3 <=> t1 /\ t2 /\ t3!t1 t2 t3. (t1 \/ t2) \/ t3 <=> t1 \/ t2 \/ t3!t1 t2. ~(t1 /\ t2) <=> ~t1 \/ ~t2!t1 t2. ~(t1 ==> t2) <=> t1 /\ ~t2!t1 t2. ~(t1 \/ t2) <=> ~t1 /\ ~t2!t1 t2. t1 \/ t2 <=> t2 \/ t1!p q. (?x. p /\ q x) <=> p /\ (?x. q x)!p q. p /\ (?x. q x) <=> (?x. p /\ q x)!p q. p \/ (?x. q x) <=> (?x. p \/ q x)!t. (!x. t) <=> t!t. (?x. t) <=> t!t. ~ ~t <=> t!t. F /\ t <=> F!t. T /\ t <=> t!t. t /\ F <=> F!t. t /\ T <=> t!t. t /\ t <=> t!t. (F <=> t) <=> ~t!t. (T <=> t) <=> t!t. (t <=> F) <=> ~t!t. (t <=> T) <=> t!t. F ==> t <=> T!t. T ==> t <=> t!t. t ==> F <=> ~t!t. t ==> T <=> T!t. F \/ t <=> t!t. T \/ t <=> T!t. t \/ F <=> t!t. t \/ T <=> T!t. t \/ t <=> t!t. t ==> t!t. (t <=> T) \/ (t <=> F)!f y. (\x. f x) y = f y!f g. (!x. f x = g x) <=> f = g!f g. (!x. f x = g x) ==> f = g!f. ONE_ONE f <=> (!x1 x2. f x1 = f x2 ==> x1 = x2)!f. ONTO f <=> (!y. ?x. y = f x)!t. (\x. t x) = t!p a. (?x. a = x /\ p x) <=> p a!p x. (!y. p y <=> y = x) ==> (@) p = x!p x. p x ==> p ((@) p)!p q. (!x. p x \/ q) <=> (!x. p x) \/ q!p q. (?x. p x /\ q) <=> (?x. p x) /\ q!p q. (?x. p x) /\ q <=> (?x. p x /\ q)!p q. (?x. p x) ==> q <=> (!x. p x ==> q)!p q. (!x. p x) \/ q <=> (!x. p x \/ q)!p q. (?x. p x) \/ q <=> (?x. p x \/ q)!p q. (!x. p x /\ q x) <=> (!x. p x) /\ (!x. q x)!p q. (?x. p x \/ q x) <=> (?x. p x) \/ (?x. q x)!p q. (!x. p x) /\ (!x. q x) <=> (!x. p x /\ q x)!p q. (?x. p x) \/ (?x. q x) <=> (?x. p x \/ q x)!p q. (!x. p x ==> q x) ==> (!x. p x) ==> (!x. q x)!p q. (!x. p x ==> q x) ==> (?x. p x) ==> (?x. q x)!p. (?x. ~p x) <=> ~(!x. p x)!p. (?!x. p x) <=> (?x. !y. p y <=> x = y)!p. (?!x. p x) <=> (?x. p x) /\ (!x x'. p x /\ p x' ==> x = x')!p. ~(!x. p x) <=> (?x. ~p x)!p. ~(?x. p x) <=> (!x. ~p x)!f b h t. foldr f b (CONS h t) = f h (foldr f b t)!f b. foldr f b [] = b!f h1 h2 t1 t2.
LENGTH t1 = LENGTH t2
==> zipwith f (CONS h1 t1) (CONS h2 t2) =
CONS (f h1 h2) (zipwith f t1 t2)!f. ?fn. !a b. fn (a,b) = f a b!f. zipwith f [] [] = []!r. (!x. ?y. r x y) <=> (?f. !x. r x (f x))!p. (!x. ?!y. p x y) <=> (?f. !x y. p x y <=> f x = y)!p. p [] /\ (!h t. p t ==> p (CONS h t)) ==> (!l. p l)!p. p _0 /\ (!n. p n ==> p (SUC n)) ==> (!n. p n)!l1 l2. zip l1 l2 = zipwith (,) l1 l2!l. l = [] \/ (?h t. l = CONS h t)!l xs. unzip l = xs,[] <=> l = [] /\ xs = []!l ys. unzip l = [],ys <=> l = [] /\ ys = []!m n p. m + n = m + p <=> n = p!m n p. m + n + p = (m + n) + p!m n. ~(m <= n) <=> n < m!m n. m <= n /\ n <= m <=> m = n!m n. m < n <=> (?d. n = m + SUC d)!m n. m < SUC n <=> m <= n!m n. m < SUC n <=> m = n \/ m < n!m n. SUC m < SUC n <=> m < n!m n. m <= SUC n <=> m = SUC n \/ m <= n!m n. SUC m <= n <=> m < n!m n. SUC m <= SUC n <=> m <= n!m n. SUC m = SUC n <=> m = n!m n. m + n = n + m!m n. m + SUC n = SUC (m + n)!m n. SUC m + n = SUC (m + n)!m. ~(m < 0)!n. ~(SUC n = _0)!n. 0 < SUC n!n. 0 <= n!m. m <= 0 <=> m = 0!n. BIT0 (SUC n) = SUC (SUC (BIT0 n))!n. BIT1 n = SUC (BIT0 n)!m. m + 0 = m!n. 0 + n = n!h x y t xs ys.
unzip (CONS h t) = CONS x xs,CONS y ys <=> h = x,y /\ unzip t = xs,ys!x. ?a b. x = a,b?f. ONE_ONE f /\ ~ONTO fF <=> (!p. p)T <=> (\p. p) = (\p. p)~F <=> T~T <=> F(~) = (\p. p ==> F)COND = (\t t1 t2. @x. ((t <=> T) ==> x = t1) /\ ((t <=> F) ==> x = t2))(/\) = (\p q. (\f. f p q) = (\f. f T T))(==>) = (\p q. p /\ q <=> p)(\/) = (\p q. !r. (p ==> r) ==> (q ==> r) ==> r)(!) = (\p. p = (\x. T))(?) = (\p. !q. (!x. p x ==> q) ==> q)(?) = (\p. p ((@) p))(?!) = (\p. (?) p /\ (!x y. p x /\ p y ==> x = y))unzip = foldr (\(x,y) (xs,ys). CONS x xs,CONS y ys) ([],[])NUMERAL = (\n. n)zip [] [] = []BIT0 0 = 0LENGTH [] = 0unzip [] = [],[] |
Contained Package |
list-zip-thm |
Comment |
Standard HOL library retrieved from OpenTheory |