libretto.CoreLib.Dual
See theDual companion object
Evidence that A
flowing in one direction is equivalent to to B
flowing in the opposite direction.
It must hold that
┏━━━━━┓ ┏━━━━━┓
┞─┐ r ┃ ┃ l ┞─┐
╎A│ I ┃ ┃ I ╎B│
┟─┘ n ┃ ┃ n ┟─┘
┏━━━━━┫ v ┃ ┏━━━━━━━━━┓ ┃ v ┣━━━━━┓ ┏━━━━━━━━━┓
┃ l ┞─┐ e ┃ ┞─┐ ┞─┐ ┃ e ┞─┐ r ┃ ┞─┐ ┞─┐
┃ I ╎B│ r ┃ = ╎A│ id[A] ╎A│ ┃ r ╎A│ I ┃ = ╎B│ id[B] ╎B│
┃ n ┟─┘ t ┃ ┟─┘ ┟─┘ ┃ t ┟─┘ n ┃ ┟─┘ ┟─┘
┃ v ┣━━━━━┛ ┗━━━━━━━━━┛ ┗━━━━━┫ v ┃ ┗━━━━━━━━━┛
┃ e ┞─┐ ┞─┐ e ┃
┃ r ╎A│ ╎B│ r ┃
┃ t ┟─┘ ┟─┘ t ┃
┗━━━━━┛ ┗━━━━━┛
Attributes
- Companion:
- object
- Graph
- Supertypes
- class Objecttrait Matchableclass Any