Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

Advertising

contraction in LK, free variable
2012 year 6 month 9 day Saturday 11:37:08 MDT 

  1. irc://irc.freenode.net/##logic
  2. Day changed to 26 May 2012
  3. 18:53 < dgpratt> there is something about this that I find troubling: http://i.imgur.com/wqL8a.png
  4. 18:54 < neophyte> sometimes i hate the responses people give to math questions on reddit.
  5. 18:54 < dgpratt> namely what happens with
  6. 18:54 < dgpratt> (r)
  7. 19:32 < matthewt> http://www.ee.surrey.ac.uk/Projects/Labview/minimisation/graphics/karintro1.gif aren't b and c mixed up on the second diagram
  8. 19:34 < Saizan> matthewt: yep, or they have some weird way to label the sides
  9. 19:35 < matthewt> okay thanks
  10. 19:35 < ski> dgpratt : it assumes non-empty domain -- otherwise i think it's fine
  11. 19:36 < ski> dgpratt : the `forall'-right application is ok since `x' isn't mentioned (freely) in any other assumption or conclusion
  12. 19:37 < ski> i think i've figured out how the proof works, computationally, as well
  13. 19:39 < ski> `x' is really a locally assumed constant here (dicharged by the `forall'-right rule). the only globally assumed inhabitant is `y'
  14. 19:51 < Saizan> maybe we should make a version of the sequent calculus where the antecedent keeps track of local variables too
  15. 19:53 < matthewt> sorry for the ignorance dgpratt, but what you pasted is an example of 'resolution' isn't it? in FOL?
  16. 19:55 < ski> Saizan : i've seen something like `Gamma |-_Chi Delta' used, with `Chi' a typing environment
  17. 19:56 < Saizan> ski: ah, probably better
  18. 19:56 < Saizan> matthewt: it's a sequent calculus proof
  19. 19:57 < ski> in LK, i think
  20. 19:57 < matthewt> oh, okay
  21. 19:57 < ski> Saizan : it fits nicer with the categorical view of the rules
  22. 19:59 < matthewt> Saizan: is it related to resolution somehow?
  23. 20:03 < ski> <http://en.wikipedia.org/wiki/Sequent_calculus#The_system_LK>
  24. 20:04 < ski> i think the cut rule is related to resolution
  25. 20:51 < dgpratt> ski: ok, thanks, I shall take your word for it :)
  26. 20:54 < dgpratt> sometimes when trying to understand these things, I try to substitute 'real' things into the statement(s)
  27. 20:55 < dgpratt> as this case demonstrates, I am finding that strategy has limited use
  28. 20:56 < dgpratt> I suppose it's probably because I know too much about the 'real' things
  29. 21:36 < ski> dgpratt : i think one "problem" with the derivation is that it is inherently classical (nonconstructive)
  30. 21:39 < ski> dgpratt : should i explain my informal computational understanding of it ?
  31. 23:01 < dgpratt> ski: I can't promise I'll fully comprehend it, but I'd appreciate any effort to explain it, yes
  32. 23:04 < ski> well, first, the top three sequents have both `x' and `y' as free variables
  33. 23:04 < ski> the rest of the them (*including* the last two ones) has only `y' as free variable
  34. 23:05 < ski> so, the final sequent is claiming that given an `y' in the domain, `exists x. (P(x) -> (forall y. P(y)))' is true
  35. 23:05 < ski> (it is not true if the domain is empty)
  36. 23:06 < ski> so, the reasoning is more or less as :
  37. 23:07 < ski> assume that someone in a computer game is claiming to have proven the final sequent (we assume the domain is non-empty for this argument)
  38. 23:07 < ski> so, they're claiming there is an `x' in the domain, and they are claiming a certain implication holds
  39. 23:08 < ski> but you're a skeptical fellow, you don't just trust the word of this other one, you want to test it
  40. 23:08 < ski> so, you need to try to manufacture a proof of `P(x)'
  41. 23:08 < ski> (where `P' is some pre-agreed predicate)
  42. 23:09 < ski> but you don't know what `x' is
  43. 23:09 < ski> maybe you fail at this first step, because you can't find a proof of `P(x)'
  44. 23:09 < ski> (and if `P(x)' *is* false, then the implication is trivially/vacuously true, so then the proof was sound)
  45. 23:10 < ski> but maybe you can figure out a proof of `P(x)' -- e.g. if you happen to know that `forall x. P(x)' is true
  46. 23:10 < ski> (then `P(x)' must be true for the mysterious `x' which you don't know yet)
  47. 23:10 < ski> so far, so good
  48. 23:11 < ski> you've produced a proof of `P(x)', and now it's time for your opponent to actually show the consequent `forall y. P(y)' of the implication
  49. 23:12 < ski> and this is true if `P(y)' is true for every `y' in the domain
  50. 23:12 < ski> so at this point you can attempt to poke a hole in your opponents reasoning, by finding an `y' where `P(y)' is false
  51. 23:13 < ski> let's say that you pick a specific element `y0' that you wonder if your opponent can prove `P(y0)' for
  52. 23:13 < ski> now, the fun happens :
  53. 23:14 < ski> at this point, your opponent quits the current game, and *loads* a previous game position, namely just before s/he told you that there is an `x' such that ...
  54. 23:14 < ski> so we're back at an earlier stage in the argument now
  55. 23:14 < ski> you have just been told there is an `x' such that the implication holds
  56. 23:15 < ski> and your task now (as before) it so try to disprove the implication, by proving the antecedent and disproving the consequent
  57. 23:15 < ski> and, as before, if you fail in proving the antecedent `P(x)', then your opponent wins by default
  58. 23:16 < ski> so, assume instead (as before) that you manage to prove `P(x)'
  59. 23:16 < ski> but the difference from before is that the secret `x' here is actually the `y0' that *you* chose in a "parallel universe"
  60. 23:16 < ski> so, you've actually proved `P(y0)' yourself !
  61. 23:17 < ski> at this point, your opponent quits the game again, and loads the position that was just after you had chosen `y0' (when you attempted to disprove `forall y. P(y)')
  62. 23:18 < ski> and this time, your opponent has a proof of `P(y0)' (which you in fact computed in the other "parallel universe")
  63. 23:18 < ski> so, for your specific choice of `y0', your opponent has proven `P(y0)'
  64. 23:18 < ski> if you want to, you could at this point load the position in the game just before you chose `y0'
  65. 23:18 < ski> and you could choose say `y1' instead
  66. 23:19 < ski> but then, by the same procedure as above, your opponent will still end up with a proof of `P(y1)'
  67. 23:19 < ski> and that's it !
  68. 23:19 < ski> dgpratt : how's that for an informal computational description ? :)
  69. 23:21 < ski> (btw, note that in the sequent `|- exists x. P(x) -> (forall y. P(y)) , exists x. P(x) -> (forall y. P(y))' the latter conclusion corresponds to the first parallel universe above, and the former conclusion corresponds to the second parallel universe)
  70. 23:22 < Saizan> these universes are more braided than parallel :)
  71. 23:24 < ski> yeah, the "parallel universe" was only meant as an analogy :)
  72. 23:30 < ski> (btw, note that the opponent didn't use your initial proof of `P(y)' : this corresponds to it being eliminated by left-weakening at the top :: similarly in the second universe, your opponent just ignored your pending wait for a proof of `forall y. P(y)' : this corresponds to the right-weakening of it at the top)
  73. Day changed to 27 May 2012
  74. 02:58 < dgpratt> ski: holy crap! nice explanation :)
  75. 03:04 < ski> dgpratt : (: any comments ?
  76. 03:14 < dgpratt> it certainly makes sense as a stand-alone explanation, but I'm still working on connecting it to the initial derivation
  77. 03:23 < dgpratt> ski: holy crap again!...maybe
  78. 03:23 < dgpratt> ok, I can't quite put this together yet, but my mind is trying to make a connection between this and how existential quantification works in Haskell
  79. 03:24 < dgpratt> (another subject of which I have a rather limited understand)
  80. 03:26 -!- augur [~augur@208.58.5.87] has joined ##logic
  81. 03:27 < ski> the thread of action in the explanation above starts tracing from the bottom sequent in the derivation, up through the right conclusion, throught the `forall y.' part which is opened by the `forall'-right rule as `x', up to the `exists'-right rule above which hides `x' as `x0' (later renamed `x' again), down through that other conclusion back to the bottom sequent
  82. 03:28 < ski> there we await the player to prove `P(x)' which we trace back up that conclusion up to the `P(x)' assumption, which is transferred over to an `P(x)' conclusion at the top
  83. 03:29 < dgpratt> ski: makes sense
  84. 03:29 < ski> and then we follow that down again the latter conclusion, as it gets `forall y0.', &c. added in front of it
  85. 03:29 < ski> eventually proving the `P(y)' part of the latter conclusion
  86. 03:29 < ski> (which by right-contraction is the single conclusion of the final sequent)
  87. 03:30 < ski> i saw you were doubtful of the `forall'-right rule before
  88. 03:30 < ski> but this isn't really that different from the following
  89. 03:31 < ski>   ------------ id
  90. 03:32 < ski>   P(x) |- P(x)
  91. 03:32 < ski>   ---------------------- |- exists
  92. 03:32 < ski>   P(x) |- exists y. P(y)
  93. 03:33 < ski>   ------------------------- |- ->
  94. 03:33 < dgpratt> the fact that the forall-right rule requires a "fresh" x makes it easier to....accept
  95. 03:33 < ski>   |- P(x) -> exists y. P(y)
  96. 03:33 < ski>   ----------------------------------- |- forall
  97. 03:33 < ski>   |- forall x. P(x) -> exists y. P(y)
  98. 03:33 < ski> here, in some sense, the `x' and the `y' is "the same"
  99. 03:34 < ski> but the point is that we've hidden one of the `x's behind the bound variable `y' when we make the `|- forall' step
  100. 03:34 < ski> so that `y' doesn't occur in any premise nor in any other conclusion before applying this rule
  101. 03:35 < ski> the same behaviour is perhaps even clearer with `exists'-elimination
  102. 03:36 < ski>   Gamma |- exists x. Phi[x]   Gamma , Phi[x] |- Psi
  103. 03:37 < ski>   ------------------------------------------------- exists-E
  104. 03:37 < ski>   Gamma |- Psi
  105. 03:37 < ski> here the *formula* `Psi' doesn't depend on `x' (nor does the other premises in `Gamma') -- but the *proof* may still depend on `x'
  106. 03:38 < ski> anyway, in a sequence `Gamma |- Phi , Psi', this `Phi , Psi' is more or less the same as `Phi \/ Psi'
  107. 03:38 < ski> so one could consider doing steps
  108. 03:38 < copumpkin> ski: you need a whiteboard :)
  109. 03:39 < ski>   P(y) |- P(x) -> forall y0. P(y0) , P(x)
  110. 03:39 < ski>   P(y) |- exists x0. P(x0) -> forall y0. P(y0) , P(x)
  111. 03:40 < dgpratt> ski: this is all good stuff and thus I am reluctant to slow you down, but I think my information-absorption potential has been exceeded for the day :)
  112. 03:40 < ski>   P(y) |- (exists x0. P(x0) -> forall y0. P(y0)) \/ P(x)
  113. 03:40 < ski>   P(y) |- forall y0. (exists x0. P(x0) -> forall y0. P(y0)) \/ P(y0)
  114. 03:40 < ski> then we use a distributive law
  115. 03:40 < dgpratt> I'll definitely be reading and re-reading all this, but I hope you won
  116. 03:40 < ski>   P(y) |- (exists x0. P(x0) -> forall y0. P(y0)) \/ (forall y0. P(y0))
  117. 03:40 < ski>   P(y) |- exists x0. P(x0) -> forall y0. P(y0) , forall y0. P(y0)
  118. 03:41 < dgpratt> err...I hope you won't expect me to make any salient comments on all this for the time being :)
  119. 03:41 < ski> in the step `.. |- forall y0. (exists x0. ..x0..) \/ P(y0)', the situation isn't very different from with `forall x. P(x) -> exists y. P(x)' in my example above
  120. 03:42 < ski> (meaning `forall x. (P(x) -> (exists y. P(x)))' if it wasn't clear)
  121. 03:42 < ski> copumpkin :)
  122. 03:42 < ski> dgpratt : ok, well i'm done :)
  123. 03:43 < ski> (the point was mostly to try to show how the situation with `exists'-right and `forall'-right in your given derivation isn't really that much different from my situation with `|- exists' and `|- forall' above)
  124. 03:46 < ski> (note how classically, `foo -> bar' is the same as `not foo \/ bar', which should perhaps make the analogy clearer)
  125.  
  126. Day changed to 31 May 2012
  127. 16:48 < dgpratt> ski: I have a question for you if you're able
  128. 16:49  * ski . o ( "to be able to disable, is that stable ?" )
  129. 16:50 < dgpratt> hmm...I'll interpret that as an affirmative
  130. 16:51 < dgpratt> every time I think I understand the concept of free and bound variables, I encounter something that tells me I don't
  131. 16:51 < dgpratt> case in point, from our conversation the other day:
  132. 16:51 < dgpratt> <ski> well, first, the top three sequents have both `x' and `y' as free variables
  133. 16:51 < dgpratt> <ski> the rest of the them (*including* the last two ones) has only `y' as free variable
  134. 16:52 < ski> hehe, yes, this is a somewhat unusual concept of free variable
  135. 16:52 < ski> but, you need something like this, if you want to allow empty domains
  136. 16:52 < ski> (and doing this is very natural in categorical semantics)
  137. 16:52 < dgpratt> this is in reference to http://i.imgur.com/wqL8a.png
  138. 16:53 < ski> "The Image you are requesting does not exist or is no longer available"
  139. 16:55 < ski> oh, right, i just realized i still have the picture open
  140. 16:55 < dgpratt> so...how does one distinguish between free and bound vars in the sequent calcululs? and...
  141. 16:56 < dgpratt> ...what are the implications as such?
  142. 16:57 < dgpratt> by the way, I was trying to think about this in terms of Haskell's type quantification and something occurred to me that kind of made sense, but I'm not sure it's the right intuition...
  143. 16:58 < dgpratt> I was thinking about a function with a type like this:
  144. 16:58 < dgpratt> f :: forall a b. (forall c. c -> a) -> b -> a
  145. 16:59 < dolio> Things are a little clearer in something like Haskell (type theory) because variables have to go in the context to specify their type.
  146. 16:59 < dolio> But that's often not done in logic because there's only one domain of discourse for the variables to range over.
  147. 16:59 < dgpratt> now as I understand it c is (in essence) an existentially quantified type var...
  148. 16:59 < dolio> (At least, in many logics.)
  149. 17:01 < dgpratt> but the implication is that in order to pass something in for that first input of 'f', I need a function that accepts a universally quantified type...right?
  150. 17:01 < dolio> It is existentially quantified in the sense that forall c. c -> T is equivalent to (exists c. c) -> T if c is not free in T.
  151. 17:03 < dolio> You can fiddle around with that type...
  152. 17:04 < dolio> forall a b. (forall c. c -> a) -> b -> a ~ forall b. b -> (forall a. (forall c. c -> a) -> a) ~ (exists b. b) -> (forall a. ((exists c. c) -> a) -> a) ~ (exists b. b) -> (exists c. c)
  153. 17:04 < dolio> Because forall a. (T -> a) -> a is isomorphic to T if a is not free in T.
  154. 17:05 < dgpratt> dolio: interesting; I shall have to ponder that some
  155. 17:10  * ski was busy transcribing the proof in question, for easy reference
  156. 17:10 < ski> here it comes :
  157. 17:10 < ski>   ----------------------------------------------------------------------------------- (axiom)
  158. 17:10 < ski>   P(x)       |-                                                                         P(x )
  159. 17:10 < ski>   ----------------------------------------------------------------------------------- (weakening-l,weakening-r)
  160. 17:10 < ski>   P(x), P(y) |-                      forall y0. P(y0) ,                                 P(x )
  161. 17:10 < ski>   ----------------------------------------------------------------------------------- (->-r)
  162. 17:10 < ski>         P(y) |-            P(x ) -> (forall y0. P(y0)),                                 P(x )
  163. 17:11 < ski>         ----------------------------------------------------------------------------- (exists-r)
  164. 17:11 < ski>         P(y) |- exists x0. P(x0) -> (forall y0. P(y0)),                                 P(x )
  165. 17:11 < ski>         ----------------------------------------------------------------------------- (forall-r)
  166. 17:11 < ski>         P(y) |- exists x . P(x ) -> (forall y0. P(y0)),                      forall y0. P(y0)
  167. 17:11 < ski>         ------------------------------------------------------------------------------ (->-r)
  168. 17:11 < ski>              |- exists x . P(x ) -> (forall y0. P(y0)),            P(y ) -> (forall y0. P(y0))
  169. 17:11 < ski>              ------------------------------------------------------------------------- (exists-r)
  170. 17:12 < ski>              |- exists x . P(x ) -> (forall y . P(y )), exists x . P(x ) -> (forall y . P(y ))
  171. 17:12 < ski>              ------------------------------------------------------------------------- (contraction-r)
  172. 17:12 < ski>              |- exists x . P(x ) -> (forall y . P(y ))
  173. 17:12 < ski> (ok, a little damaged, but i hope it will do)
  174. 17:13 < ski> dgpratt : to answer your question, the classical definition of a free variable means the variable must occur at least once (and "freely")
  175. 17:13 < ski> however, it's often nicer to keep track of exactly which variables are *allowed* to occur in an expression/formula
  176. 17:14 < ski> e.g. in math, `x - x' can be expressed as `0'
  177. 17:14 < ski> we'd like to say that when we state `x - x = 0', then both sub-expressions here have the same set of free variables
  178. 17:14 < ski> so, here we're distinguishing between the variables that actually *occur* (freely) and those that *may* occur
  179. 17:15 < ski> the former must be a subset of the latter
  180. 17:15 < dolio> Man, LK is weird.
  181. 17:15 < ski> (this is a bit similar to specifying a codomain of a function as a set which only need to *contain* every possibly result-value of the function)
  182. 17:16 < ski> (dolio : you say my computational interpretation of this proof some days ago ? :)
  183. 17:16 < dgpratt> ski: oh, I think I see -- but I've been burned on that before :)
  184. 17:16 < ski> in most common accounts of (single-sorted) logic, this is a correct inference :
  185. 17:16 < dolio> ski: No, but I have a vague idea of how it'd go.
  186. 17:17 < dolio> Those uses of ->-r feel wrong to me, though. :)
  187. 17:19 < dolio> Presumably your interpretation is that it's setting up communicating processes of a sort, though?
  188. 17:20 < ski>                    ----------------------
  189. 17:21 < ski>                    P(x) |-           P(x)
  190. 17:21 < ski>          -------------------------------- exists
  191. 17:21 < ski>                    P(x) |- exists x. P(x)
  192. 17:21 < ski>   forall --------------------------------
  193. 17:21 < ski>          forall x. P(x) |- exists x. P(x)
  194. 17:21 < ski> so, e.g. from `forall x. x = x' we can conclude `exists x. x = x'
  195. 17:21 < ski> iow, the domain is non-empty
  196. 17:22 < ski> (or, if every invisible unicorn is pink, then there exists an invisible unicorn, which is pink)
  197. 17:23 < dolio> No.
  198. 17:23 < dolio> If everything is an invisible pink unicorn, then there exists an invisible pink unicorn.
  199. 17:23 < ski> (the domain here is the set of all invisible unicorns)
  200. 17:24 < dolio> I guess that works, too.
  201. 17:24 < ski> dgpratt : so, what we're going to do instead is to explicitly mention the variables which are *allowed* to occur in the premises and conclusions
  202. 17:24 < dolio> Presumably you wouldn't be able to prove that all invisible unicorns are pink, I guess.
  203. 17:24 < ski> and we're going to say that in `Gamma |- Delta', we have a single set of variables which are allowed to occur
  204. 17:24 < ski> the "free variables"
  205. 17:25 < ski> dolio : hm, i suppose i'd better permute `unicorn' and `pink'
  206. 17:25 < ski> (so that we have the domain of all invisible pink stuff)
  207. 17:26 < ski> (so that we can conclude that having such a thing is a contradiction in terms)
  208. 17:26 < ski> anyway
  209. 17:26 < ski> we're going to write `Gamma |-_{Chi} Delta', where `Chi' is the set of free variables, for this sequent
  210. 17:26 < ski> so, we get
  211. 17:27 < ski>                    --------------------------
  212. 17:27 < dolio> Well, if your domain of discourse is invisible pink stuff, the domain is empty, so the logic is letting you do unsound things. :)
  213. 17:27 < ski>                    P(x) |-_{x}           P(x)
  214. 17:27 < ski>                    ---------------------- exists
  215. 17:27 < ski>                    P(x) |-_{x} exists x. P(x)
  216. 17:27 < ski>   forall ------------------------------------
  217. 17:27 < ski>          forall x. P(x) |-_{x} exists x. P(x)
  218. 17:28 < ski> dp the point to note is that we *still* have `x' as a free variable in the final sequent
  219. 17:28 < dgpratt> ski: noted
  220. 17:29 < ski> so, this really reads something like : provided that we have an individual `x' in the domain, then if for every `x', `P(x)' holds, then there exists an `x' such that `P(x)' holds
  221. 17:29 < ski> you can get rid of variables by using a substitution
  222. 17:30 < ski> e.g. going from `P(x,y) |-_{x,y} Q(s(x))' to `P(s(y),y) |-_{y} Q(s(s(y)))'
  223. 17:31 < ski> and you can do that in the above little proof, thus getting rid of the free (but non-occuring) variable `x'
  224. 17:31 < dgpratt> ski: hmm
  225. 17:31 < ski> but then you instead get all the variables which freely occured in the term you substituted for `x'
  226. 17:32 < ski> so, the only way to end up with an empty set of free variables is to have a *closed* term to substitute for `x'
  227. 17:32 < ski> e.g. if you're working in a signature where you have a constant `z' :)
  228. 17:33 < ski> dgpratt : in your more complicated proof a bit up, the same thing happens with `y'
  229. 17:33 < ski> but not with `x'
  230. 17:33 < ski> only `y' is a free variable in the last sequent
  231. 17:36 < dgpratt> ski: ok, I'm gonna save this chat log and re-read it 10 or so times until it sinks in :)
  232. 17:36 < ski> this is because the right-rule for `forall' "discharges" the assumption of `x' being an individual in the domain
  233. 17:37 < ski> the right-rule for `exists' only takes something that exists, and hides it in the formula
  234. 17:38 < ski> you are still implicitly depending on it existing (and specifically, of the variables occuring in it existing)
  235. 17:38 < ski> similarly for the left-rule for `forall', here you have a general assumption, and instantiate to an already existing thing
  236. 17:39 < ski> but not so in right-rule for `forall', since here the variable is actually a hypothetical/arbitrary element, which need not correspond to *any* actual elements (i.e. the number of elements in the domain can be zero)
  237. 17:40 < ski> and similarly for the left-rule for `exists', here you're not already assuming the existence of the things, because the existential *itself* encodes the assumption of the thing existing
  238. 17:41 < dgpratt> ski: ok, that makes sense at an elementary level
  239. 17:41 < ski> i.e. you don't need to keep track of the thing as one (or depending on some) variable(s) -- because simply by assuming the existential formula do you *implicitly* assume the existence of the thing
  240. 17:42 < ski> the left-rule merely takes the step from this existence being implicit, to it being explicit (or in the other direction, depending on whether you read the derivation from the conclusion up, or from the axioms down)
  241. 17:43 < ski> dgpratt : mayhaps you'd like to add free-variable-sets to all of the basic rules, to better understand how they get propagated ?
  242. 17:44 < ski> dolio : yes, which was the point, of course :)
  243. 17:44 < dolio> Ah.
  244. 17:45 < dgpratt> I think so...but not presently :) I'm still trying to absorb all you've said so far :)
  245. 17:45 < ski> (well, i suppose a greater point was to show that to be able to talk about domains that we don't know yet whether they're empty or not, we need to allow for the possibility of empty domains -- and the above is a nice way to do this)

advertising

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

fantasy-obligation