{"action":"created","issue":{"url":"https://api.github.com/repos/overturetool/documentation/issues/9","labels_url":"https://api.github.com/repos/overturetool/documentation/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/overturetool/documentation/issues/9/comments","events_url":"https://api.github.com/repos/overturetool/documentation/issues/9/events","html_url":"https://github.com/overturetool/documentation/issues/9","id":122894013,"number":9,"title":"union and munion pattern","user":{"login":"tomooda","id":836308,"avatar_url":"https://avatars.githubusercontent.com/u/836308?v=3","gravatar_id":"","url":"https://api.github.com/users/tomooda","html_url":"https://github.com/tomooda","followers_url":"https://api.github.com/users/tomooda/followers","following_url":"https://api.github.com/users/tomooda/following{/other_user}","gists_url":"https://api.github.com/users/tomooda/gists{/gist_id}","starred_url":"https://api.github.com/users/tomooda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomooda/subscriptions","organizations_url":"https://api.github.com/users/tomooda/orgs","repos_url":"https://api.github.com/users/tomooda/repos","events_url":"https://api.github.com/users/tomooda/events{/privacy}","received_events_url":"https://api.github.com/users/tomooda/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-12-18T07:06:58Z","updated_at":"2015-12-18T10:30:23Z","closed_at":null,"body":"The LRM says in Chapter 7\r\n> In the VDM interpreters the two subsets will always be chosen\r\n> such that they are non-empty and disjoint.\r\n\r\nI'm afraid this explanation may give misunderstanding. \r\nI first interpreted \"they are non-empty\" as \"neither of the two subsets can be empty\", but I think either subset can be empty, for example, {a} union rest should match against {1} with bindings a = 1 and rest = {}. A similar explanation is seen in munion."},"comment":{"url":"https://api.github.com/repos/overturetool/documentation/issues/comments/165742296","html_url":"https://github.com/overturetool/documentation/issues/9#issuecomment-165742296","issue_url":"https://api.github.com/repos/overturetool/documentation/issues/9","id":165742296,"user":{"login":"nickbattle","id":1751423,"avatar_url":"https://avatars.githubusercontent.com/u/1751423?v=3","gravatar_id":"","url":"https://api.github.com/users/nickbattle","html_url":"https://github.com/nickbattle","followers_url":"https://api.github.com/users/nickbattle/followers","following_url":"https://api.github.com/users/nickbattle/following{/other_user}","gists_url":"https://api.github.com/users/nickbattle/gists{/gist_id}","starred_url":"https://api.github.com/users/nickbattle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickbattle/subscriptions","organizations_url":"https://api.github.com/users/nickbattle/orgs","repos_url":"https://api.github.com/users/nickbattle/repos","events_url":"https://api.github.com/users/nickbattle/events{/privacy}","received_events_url":"https://api.github.com/users/nickbattle/received_events","type":"User","site_admin":false},"created_at":"2015-12-18T10:30:23Z","updated_at":"2015-12-18T10:30:23Z","body":"I just tried this in VDMJ. You need ({{}}) in the LHS to match element {} in the value, since the LHS has to be an expression that is a set which contains the value to match. But in that case, you can happily do the following:\r\n```\r\n> p let ({{}}) union a = {{},1} in a\r\n= {1}\r\nExecuted in 0.027 secs. \r\n```"}}