Advertisement
Guest User

A9

a guest
Dec 10th, 2019
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.86 KB | None | 0 0
  1. Theorem: is-univalent f ⇒ x ∈ Dom f ⇒ f ⦇ { x } ⦈ = { f @ x }
  2. Proof:
  3. Assuming `is-univalent f`, `x ∈ Dom f`:
  4. Using “Set extensionality”:
  5. true
  6. ≡⟨ “True ∀ body”, “Reflexivity of ≡” ⟩
  7. ∀ a • a ∈ { f @ x } ≡ a ∈ { f @ x }
  8. ≡⟨ “Singleton set membership” ⟩
  9. ∀ a • a = f @ x ≡ a ∈ { f @ x }
  10. ≡⟨ “Partial-function application” with Assumption `is-univalent f` `x ∈ Dom f` ⟩
  11. ∀ a • (x ⦗ f ⦘ a) ≡ a ∈ { f @ x }
  12. ≡⟨ Substitution ⟩
  13. ∀ a • (b ⦗ f ⦘ a)[b ≔ x] ≡ a ∈ { f @ x }
  14. ≡⟨ “One-point rule for ∃”, “Trading for ∃” ⟩
  15. ∀ a • (∃ b • x = b ∧ b ⦗ f ⦘ a) ≡ a ∈ { f @ x }
  16. ≡⟨ “Singleton set membership” ⟩
  17. ∀ a • (∃ b • b ∈ { x } ∧ b ⦗ f ⦘ a) ≡ a ∈ { f @ x }
  18. ≡⟨ “Trading for ∃” ⟩
  19. ∀ a • (∃ b ❙ b ∈ { x } • b ⦗ f ⦘ a) ≡ a ∈ { f @ x }
  20. ≡⟨ “Relational image” ⟩
  21. ∀ a • a ∈ f ⦇ { x } ⦈ ≡ a ∈ { f @ x }
  22.  
  23. Theorem “Relationship with @”:
  24. is-univalent f ⇒ x ∈ Dom f ⇒ x ⦗ f ⦘ (f @ x)
  25. Proof:
  26. Assuming `is-univalent f`, `x ∈ Dom f`:
  27. x ⦗ f ⦘ (f @ x)
  28. ≡⟨ “Partial-function application” with Assumption `is-univalent f` `x ∈ Dom f` ⟩
  29. (f @ x) = f @ x
  30. ≡⟨ “Reflexivity of =” ⟩
  31. true
  32.  
  33. Theorem “Membership in domain of ⨾”:
  34. x ∈ Dom (R ⨾ S) ≡ x ∈ Dom R ∧ (∃ y ❙ x ⦗ R ⦘ y • y ∈ Dom S)
  35. Proof:
  36. Using “Mutual implication”:
  37. Subproof for `x ∈ Dom (R ⨾ S) ⇒ x ∈ Dom R ∧ (∃ y ❙ x ⦗ R ⦘ y • y ∈ Dom S)`:
  38. Assuming `x ∈ Dom (R ⨾ S)`:
  39. true
  40. ≡⟨ Assumption `x ∈ Dom (R ⨾ S)` ⟩
  41. x ∈ Dom (R ⨾ S)
  42. ≡⟨ “Membership in `Dom`” ⟩
  43. (∃ b • x ⦗ R ⨾ S ⦘ b)
  44. ≡⟨ “Relation composition” ⟩
  45. (∃ b • ∃ y • x ⦗ R ⦘ y ∧ y ⦗ S ⦘ b)
  46. ≡⟨ “Interchange of dummies for ∃” ⟩
  47. ∃ y • ∃ b • x ⦗ R ⦘ y ∧ y ⦗ S ⦘ b
  48. ≡⟨ “Distributivity of ∧ over ∃” ⟩
  49. (∃ y • x ⦗ R ⦘ y ∧ ∃ b • y ⦗ S ⦘ b)
  50. ≡⟨ “Idempotency of ∧” ⟩
  51. (∃ y • x ⦗ R ⦘ y ∧ ∃ b • y ⦗ S ⦘ b)
  52. (∃ y • x ⦗ R ⦘ y ∧ ∃ b • y ⦗ S ⦘ b)
  53. ≡⟨ “Trading for ∃” ⟩
  54. (∃ y • x ⦗ R ⦘ y ∧ ∃ b • y ⦗ S ⦘ b)
  55. (∃ y ❙ x ⦗ R ⦘ y • ∃ b • y ⦗ S ⦘ b)
  56. ≡⟨ “Membership in `Dom`” ⟩
  57. (∃ y • x ⦗ R ⦘ y ∧ y ∈ Dom S )
  58. (∃ y ❙ x ⦗ R ⦘ y • ∃ b • y ⦗ S ⦘ b)
  59. ⇒⟨ Monotonicity with “Weakening” ⟩
  60. (∃ y • x ⦗ R ⦘ y) ∧ (∃ y ❙ x ⦗ R ⦘ y • (∃ b • y ⦗ S ⦘ b))
  61. ≡⟨ “Membership in `Dom`” ⟩
  62. x ∈ Dom R ∧ (∃ y ❙ x ⦗ R ⦘ y • y ∈ Dom S)
  63.  
  64. Subproof for `x ∈ Dom R ∧ (∃ y ❙ x ⦗ R ⦘ y • y ∈ Dom S) ⇒ x ∈ Dom (R ⨾ S)`:
  65. Assuming `x ∈ Dom R ∧ (∃ y ❙ x ⦗ R ⦘ y • y ∈ Dom S)`:
  66. true
  67. ≡⟨ Assumption `x ∈ Dom R ∧ (∃ y ❙ x ⦗ R ⦘ y • y ∈ Dom S)` ⟩
  68. x ∈ Dom R ∧ (∃ y ❙ x ⦗ R ⦘ y • y ∈ Dom S)
  69. ⇒⟨ “Weakening” ⟩
  70. ∃ y ❙ x ⦗ R ⦘ y • y ∈ Dom S
  71. ≡⟨ “Membership in `Dom`” ⟩
  72. ∃ y ❙ x ⦗ R ⦘ y • ∃ b • y ⦗ S ⦘ b
  73. ≡⟨ “Nesting for ∃”, “Interchange of dummies for ∃” ⟩
  74. ∃ b • ∃ y ❙ x ⦗ R ⦘ y • y ⦗ S ⦘ b
  75. ≡⟨ “Trading for ∃” ⟩
  76. ∃ b • ∃ y • x ⦗ R ⦘ y ∧ y ⦗ S ⦘ b
  77. ≡⟨ “Relation composition” ⟩
  78. ∃ b • x ⦗ R ⨾ S ⦘ b
  79. ≡⟨ “Membership in `Dom`” ⟩
  80. x ∈ Dom (R ⨾ S)
  81.  
  82. Theorem “Partial-function application of ⨾”:
  83. is-univalent f ⇒
  84. is-univalent g ⇒
  85. x ∈ Dom (f ⨾ g) ⇒ (f ⨾ g) @ x = g @ (f @ x)
  86. Proof:
  87. Assuming `is-univalent f`, `is-univalent g`:
  88. Assuming `x ∈ Dom (f ⨾ g)` and using with “Membership in domain of ⨾”:
  89. (f ⨾ g) @ x = g @ (f @ x)
  90. ≡⟨ “Left-identity of ⇒” ⟩
  91. true ⇒ (f ⨾ g) @ x = g @ (f @ x)
  92. ≡⟨ “Univalence of composition” with Assumption `is-univalent f` `is-univalent g` ⟩
  93. is-univalent (f ⨾ g) ⇒ (f ⨾ g) @ x = g @ (f @ x)
  94. ≡⟨ “Left-identity of ⇒” ⟩
  95. true ⇒ is-univalent (f ⨾ g) ⇒ (f ⨾ g) @ x = g @ (f @ x)
  96. ≡⟨ Assumption `x ∈ Dom (f ⨾ g)` ⟩
  97. x ∈ Dom f ∧ (∃ y ❙ x ⦗ f ⦘ y • y ∈ Dom g) ⇒ is-univalent (f ⨾ g) ⇒ (f ⨾ g) @ x = g @ (f @ x)
  98. ≡⟨ “Partial-function application” with Assumption `is-univalent f` `x ∈ Dom (f ⨾ g)` ⟩
  99. x ∈ Dom f ∧ (∃ y ❙ y = f @ x • y ∈ Dom g) ⇒ is-univalent (f ⨾ g) ⇒ (f ⨾ g) @ x = g @ (f @ x)
  100. ≡⟨ “Trading for ∃”, “One-point rule for ∃” ⟩
  101. x ∈ Dom f ∧ (y ∈ Dom g)[y ≔ f @ x] ⇒ is-univalent (f ⨾ g) ⇒ (f ⨾ g) @ x = g @ (f @ x)
  102. ≡⟨ Substitution, “Shunting” ⟩
  103. x ∈ Dom f ⇒ f @ x ∈ Dom g ⇒ is-univalent (f ⨾ g) ⇒ (f ⨾ g) @ x = g @ (f @ x)
  104. ≡⟨ Subproof:
  105. Assuming `x ∈ Dom f`, `(f @ x) ∈ Dom g`, `is-univalent (f ⨾ g)`:
  106. (f ⨾ g) @ x = g @ (f @ x)
  107. ≡⟨ “Partial-function application” with Assumption `is-univalent (f ⨾ g)` `x ∈ Dom (f ⨾ g)` ⟩
  108. x ⦗ (f ⨾ g) ⦘ (g @ (f @ x))
  109. ≡⟨ “Relation composition” ⟩
  110. ∃ b • x ⦗ f ⦘ b ∧ b ⦗ g ⦘ (g @ (f @ x))
  111. ≡⟨ “Partial-function application” with Assumption `is-univalent f` `x ∈ Dom (f ⨾ g)` ⟩
  112. ∃ b • b = f @ x ∧ b ⦗ g ⦘ (g @ (f @ x))
  113. ≡⟨ “One-point rule for ∃”, “Trading for ∃” ⟩
  114. (b ⦗ g ⦘ (g @ (f @ x)))[b ≔ f @ x]
  115. ≡⟨ Substitution ⟩
  116. f @ x ⦗ g ⦘ (g @ (f @ x))
  117. ≡⟨ “Partial-function application” with Assumption `is-univalent g` `x ∈ Dom (f ⨾ g)` ⟩
  118. f @ x ⦗ g ⦘ (g @ (f @ x))
  119. ≡⟨ “Partial-function application” with Assumption `is-univalent g` `(f @ x) ∈ Dom g` ⟩
  120. (g @ (f @ x)) = (g @ (f @ x))
  121. ≡⟨ “Reflexivity of =” ⟩
  122. true
  123. true
  124.  
  125. Theorem “Injectivity and @”:
  126. is-univalent f ⇒
  127. is-injective f ⇒
  128. x₁ ∈ Dom f ⇒
  129. x₂ ∈ Dom f ⇒
  130. (f @ x₁ = f @ x₂ ≡ x₁ = x₂)
  131. Proof:
  132. Assuming `is-univalent f`, `is-injective f`, `x₁ ∈ Dom f`, `x₂ ∈ Dom f`:
  133. Using “Mutual implication”:
  134. Subproof for `(f @ x₁ = f @ x₂ ⇒ x₁ = x₂)`:
  135. Assuming `f @ x₁ = f @ x₂`:
  136. true
  137. ≡⟨ “Identity of ∧”, “Relationship with @” with Assumption `is-univalent f` `x₁ ∈ Dom f` `x₂ ∈ Dom f` ⟩
  138. x₂ ⦗ f ⦘ (f @ x₂) ∧ x₁ ⦗ f ⦘ (f @ x₁)
  139. ≡⟨ Assumption `f @ x₁ = f @ x₂` ⟩
  140. x₂ ⦗ f ⦘ (f @ x₂) ∧ x₁ ⦗ f ⦘ (f @ x₂)
  141. ⇒⟨ Assumption `is-injective f` with “Injectivity” ⟩
  142. x₁ = x₂
  143. Subproof for `x₁ = x₂ ⇒ f @ x₁ = f @ x₂`:
  144. Assuming `x₁ = x₂`:
  145. true
  146. ≡⟨ “Identity of ∧”, “Relationship with @” with Assumption `is-univalent f` `x₁ ∈ Dom f` `x₂ ∈ Dom f` ⟩
  147. x₂ ⦗ f ⦘ (f @ x₂) ∧ x₁ ⦗ f ⦘ (f @ x₁)
  148. ≡⟨ Assumption `x₁ = x₂` ⟩
  149. x₁ ⦗ f ⦘ (f @ x₂) ∧ x₁ ⦗ f ⦘ (f @ x₁)
  150. ⇒⟨ Assumption `is-univalent f` with “Univalence” ⟩
  151. f @ x₁ = f @ x₂
  152.  
  153. ------ A9.2
  154.  
  155. Lemma “Subset of intersection”: (Q ∩ R) ⊆ Q
  156. Proof:
  157. (Q ∩ R) ⊆ Q
  158. ≡⟨ “Weakening for ∩”, “Identity of ∧” ⟩
  159. (Q ∩ R) ⊆ Q ∧ (Q ∩ R) ⊆ R ∧ (Q ∩ R) ⊆ Q
  160. ≡⟨ “Characterisation of ∩” ⟩
  161. (Q ∩ R) ⊆ (Q ∩ R) ∩ Q
  162. ≡⟨ “Symmetry of ∩”, “Associativity of ∩” ⟩
  163. (Q ∩ R) ⊆ (Q ∩ Q) ∩ R
  164. ≡⟨ “Idempotency of ∩” ⟩
  165. (Q ∩ R) ⊆ Q ∩ R
  166. ≡⟨ “Reflexivity of ⊆” ⟩
  167. true
  168.  
  169. Theorem “Modal rule”:
  170. (Q ⨾ R) ∩ S ⊆ (Q ∩ S ⨾ R ˘) ⨾ R
  171. Proof:
  172. (Q ⨾ R) ∩ S
  173. ⊆⟨ “Dedekind rule” ⟩
  174. ((Q ∩ S ⨾ R ˘) ⨾ (R ∩ Q ˘ ⨾ S))
  175. ⊆⟨ “Sub-distributivity of ⨾ over ∩” ⟩
  176. ((Q ∩ S ⨾ R ˘) ⨾ R ) ∩ ((Q ∩ S ⨾ R ˘) ⨾ (Q ˘ ⨾ S))
  177. ⊆⟨ “Subset of intersection” ⟩
  178. (Q ∩ S ⨾ R ˘) ⨾ R
  179.  
  180. Theorem “Modal rule”:
  181. (Q ⨾ R) ∩ S ⊆ Q ⨾ (R ∩ Q ˘ ⨾ S)
  182. Proof:
  183. (Q ⨾ R) ∩ S
  184. ⊆⟨ “Dedekind rule” ⟩
  185. (Q ∩ S ⨾ R ˘) ⨾ (R ∩ Q ˘ ⨾ S)
  186. ⊆⟨ “Sub-distributivity of ⨾ over ∩” ⟩
  187. (Q ⨾ (R ∩ Q ˘ ⨾ S)) ∩ (S ⨾ R ˘ ⨾ (R ∩ Q ˘ ⨾ S))
  188. ⊆⟨ “Subset of intersection” ⟩
  189. Q ⨾ (R ∩ Q ˘ ⨾ S)
  190.  
  191. Theorem “Hesitation”: R ⊆ R ⨾ R ˘ ⨾ R
  192. Proof:
  193. R
  194. =⟨ “Idempotency of ∩”, “Reflexivity of ⊆” ⟩
  195. R ∩ R
  196. =⟨ “Identity of ⨾” ⟩
  197. R ⨾ Id ∩ R
  198. ⊆⟨ “Modal rule” ⟩
  199. R ⨾ (Id ∩ R ˘ ⨾ R)
  200. ⊆⟨ “Sub-distributivity of ⨾ over ∩” ⟩
  201. (R ⨾ Id ∩ R ⨾ R ˘ ⨾ R)
  202. ⊆⟨ “Subset of intersection” ⟩
  203. R ⨾ R ˘ ⨾ R
  204.  
  205. Theorem “PER factoring”:
  206. is-symmetric Q ⇒ is-transitive Q ⇒ Q ⨾ R ∩ Q = Q ⨾ (R ∩ Q)
  207. Proof:
  208. Assuming `is-symmetric Q` and using with “Definition of symmetry”:
  209. Assuming `is-transitive Q` and using with “Definition of transitivity”:
  210. Q ⨾ R ∩ Q
  211. ⊆⟨ “Modal rule” ⟩
  212. Q ⨾ (R ∩ Q ˘ ⨾ Q)
  213. ⊆⟨ Monotonicity with Assumption `is-symmetric Q` ⟩
  214. Q ⨾ (R ∩ Q ⨾ Q)
  215. ⊆⟨ Monotonicity with Assumption `is-transitive Q` ⟩
  216. Q ⨾ (R ∩ Q)
  217. ⊆⟨ “Sub-distributivity of ⨾ over ∩” ⟩
  218. (Q ⨾ R) ∩ (Q ⨾ Q)
  219. ⊆⟨ Monotonicity with Assumption `is-transitive Q` ⟩
  220. Q ⨾ R ∩ Q
  221.  
  222. Theorem “Reflexive implies total”:
  223. is-reflexive R ⇒ is-total R
  224. Proof:
  225. is-reflexive R ⇒ is-total R
  226. ≡⟨ “Idempotency of ∧” ⟩
  227. (is-reflexive R ∧ is-reflexive R) ⇒ is-total R
  228. ≡⟨ “Reflexivity of converse”, “Shunting” ⟩
  229. is-reflexive (R ˘) ⇒ is-reflexive R ⇒ is-total R
  230. ≡⟨ Subproof:
  231. Assuming `is-reflexive (R ˘)`, `is-reflexive R`:
  232. is-total R
  233. ≡⟨ “Definition of totality” ⟩
  234. Id ⊆ R ⨾ R ˘
  235. ≡⟨ “Definition of reflexivity” ⟩
  236. is-reflexive (R ⨾ R ˘)
  237. ≡⟨ “Reflexivity of ⨾” with Assumption `is-reflexive (R ˘)` `is-reflexive R` ⟩
  238. true
  239. true
  240.  
  241. Theorem “Idempotency from symmetric and transitive”:
  242. is-symmetric R ⇒ is-transitive R ⇒ is-idempotent R
  243. Proof:
  244. is-symmetric R ⇒ is-transitive R ⇒ is-idempotent R
  245. ≡⟨ “Definition of idempotency” ⟩
  246. is-symmetric R ⇒ is-transitive R ⇒ R ⨾ R = R
  247. ≡⟨ Subproof:
  248. Assuming `is-symmetric R` and using with “Definition of symmetry”:
  249. Assuming `is-transitive R` and using with “Definition of transitivity”:
  250. R ⨾ R
  251. ⊆⟨ Assumption `is-transitive R` ⟩
  252. R
  253. ⊆⟨ “Hesitation” ⟩
  254. R ⨾ R ˘ ⨾ R
  255. ⊆⟨ Monotonicity with Assumption `is-symmetric R` ⟩
  256. R ⨾ R ⨾ R
  257. ⊆⟨ Monotonicity with Assumption `is-transitive R` ⟩
  258. R ⨾ R
  259. true
  260.  
  261. Theorem “Right-distributivity of ⨾ with univalent over ∩”:
  262. is-univalent F ⇒ F ⨾ (R ∩ S) = F ⨾ R ∩ F ⨾ S
  263. Proof:
  264. Assuming `is-univalent F` and using with “Definition of univalence”:
  265. F ⨾ (R ∩ S)
  266. ⊆⟨ “Sub-distributivity of ⨾ over ∩” ⟩
  267. F ⨾ R ∩ (F ⨾ S)
  268. ⊆⟨ “Modal rule” ⟩
  269. F ⨾ (R ∩ F ˘ ⨾ (F ⨾ S))
  270. =⟨ “Associativity of ⨾” ⟩
  271. F ⨾ (R ∩ (F ˘ ⨾ F) ⨾ S)
  272. ⊆⟨ Monotonicity with Assumption `is-univalent F` ⟩
  273. F ⨾ (R ∩ Id ⨾ S)
  274. =⟨ “Identity of ⨾” ⟩
  275. F ⨾ (R ∩ S)
  276.  
  277. Theorem “Swapping mapping across ⊆”:
  278. is-mapping F ⇒ (R ⨾ F ⊆ S ≡ R ⊆ S ⨾ F ˘)
  279. Proof:
  280. is-mapping F ⇒ (R ⨾ F ⊆ S ≡ R ⊆ S ⨾ F ˘)
  281. ≡⟨ “Definition of mappings” ⟩
  282. F ˘ ⨾ F ⊆ Id ∧ Id ⊆ F ⨾ F ˘ ⇒ (R ⨾ F ⊆ S ≡ R ⊆ S ⨾ F ˘)
  283. ≡⟨ “Shunting” ⟩
  284. F ˘ ⨾ F ⊆ Id ⇒ Id ⊆ F ⨾ F ˘ ⇒ (R ⨾ F ⊆ S ≡ R ⊆ S ⨾ F ˘)
  285. ≡⟨ Subproof:
  286. Assuming `F ˘ ⨾ F ⊆ Id` , `Id ⊆ F ⨾ F ˘`:
  287. R ⨾ F ⊆ S
  288. ⇒⟨ “Monotonicity of ⨾” ⟩
  289. R ⨾ F ⨾ F ˘ ⊆ S ⨾ F ˘
  290. ⇒⟨ Antitonicity with Assumption `Id ⊆ F ⨾ F ˘` ⟩
  291. R ⨾ Id ⊆ S ⨾ F ˘
  292. ≡⟨ “Identity of ⨾” ⟩
  293. R ⊆ S ⨾ F ˘
  294. ⇒⟨ “Monotonicity of ⨾” ⟩
  295. R ⨾ F ⊆ S ⨾ F ˘ ⨾ F
  296. ⇒⟨ Monotonicity with Assumption `F ˘ ⨾ F ⊆ Id` ⟩
  297. R ⨾ F ⊆ S ⨾ Id
  298. ≡⟨ “Identity of ⨾” ⟩
  299. R ⨾ F ⊆ S
  300. true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement