Lean - Tumblr Posts - Page 2
Curry-howard correspondence is a neat little thing.
Tuples are equivalent to And
Sum Types are equivalent to Or
atleast Exclusive Or I think, since you can't have an `Either p q` be both `Left p` and `Right q` at once. They'd need to be more like `Either a (Either b (a,b))`
Keep in mind that `a,b` can be any type, not just booleans. It's not so much a comparison as much as it just says if the type exists.
(Exists in the way there's a representation of it in code.)
For the longest time I just thought it was just some cool equivalence. I've never really utilized this concept until I've used Lean which actually utilizes this concept. Proving two statements are equivalent means creating an isomorphism between both of the types.
For example
Proving
(P ∨ Q) ∨ R = P ∨ (Q ∨ R)
Is similar to proving the Isomorphism
Either (Either P Q) R
<=> Either P (Either Q R)
(a <=> b is equal to a -> b and b <- a) btw
And
Proving
(P ∧ Q) ∧ R = P ∧ (Q ∧ R)
Is similar to making the Isomorphism
((P,Q),R) <=> (P,(Q,R))
(Though of course And is easier due to the inclusivity thing I mentioned earlier)
For my next campaign!
WE'RE MAKING THE LEAN POTION!
Summer of shredding: Pull day, rack pulls 3x475x6...back is on fire 🔥, But happy these went up nicely 💪🏾👌🏽 y’all, all brought to you by #rahmantrainingsystems @rahman___noodles #rackpullsfordays #rackpulls #making strength gains #gainz💯 #lean-muscle #leangains #superman #manofsteel #traininglikeabeast #traininglikeasaiyan #traininglikeakryptionan #traininglikeakryptonianthatsgoingsupersayian #dedication #determination #summershredding2019 #nicaragua🇳🇮 #nicaraguan #nicaraguense #nicaraguanboy🇳🇮 #nicaraguanboyinsugarlandandalief #rahmantrainingsystems #shreddingforsummer2019 @sb.powerlifting thanks for the vid and motivation 👌🏽 (at 24 Hour Fitness - Dairy Ashford, TX) https://www.instagram.com/p/BuHBAMankcW/?utm_source=ig_tumblr_share&igshid=ufeovdlrs5i6