Skip to content

Instantly share code, notes, and snippets.

@LeeeeT
Last active June 3, 2025 19:15
Show Gist options
  • Select an option

  • Save LeeeeT/b2b2a7a655ccaac741b2a736fe09751e to your computer and use it in GitHub Desktop.

Select an option

Save LeeeeT/b2b2a7a655ccaac741b2a736fe09751e to your computer and use it in GitHub Desktop.
P ⊢ Q
----- →-Intro
P → Q
P → Q P
-------------- →-Elim
Q
----------- name_encoder
Name → JSON
---------- age_encoder
Age → JSON
---------------------------------------------- employee_encoder
(Name → JSON) → (Age → JSON) → Employee → JSON
------------------------------------- department_encoder
(Employee → JSON) → Department → JSON
------------------------------------ company_encoder
(Department → JSON) → Company → JSON
------- company
Company
---------------------------------------------- employee_encoder ----------- name_encoder
(Name → JSON) → (Age → JSON) → Employee → JSON Name → JSON
---------------------------------------------------------------------------------- →-Elim ---------- age_encoder
(Age → JSON) → Employee → JSON Age → JSON
------------------------------------- department_encoder ----------------------------------------------------------------------------------------------------------- →-Elim
(Employee → JSON) → Department → JSON Employee → JSON
------------------------------------ company_encoder ------------------------------------------------------------------------------- →-Elim
(Department → JSON) → Company → JSON Department → JSON
----------------------------------------------------------------------------- →-Elim ------- company
Company → JSON Company
--------------------------------------------------------------------------------------------------- →-Elim
JSON
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment