#
# a modal Hilbert calculus on modal logic (based on =>,~ which is a complete operator system)
# @attribute sound
# @attribute complete
# @attribute positive
# @attribute deductive
#
# Inference Rules
#
|- A=>(B=>A)				# Ax1 weakening
##|- (A=>(B=>C)) => ((A=>B)=>(A=>C))	# Ax2 distributive
|- (~A=>~B)=>(B=>A)			# Ax3 contra positive
|- [](A->B)->([]A->[]B)
A, A=>B |- B				# Mp modus (ponendo) ponens
## A |- []A					# necessitation "Gdelregel" (for global consequence)


# additional
#   "->"
[]A |= ~<>~A
#   "<-"
~<>~A |= []A
#   "<->"
## []A == ~<>~A

#
# 
#

#   "->"
<>A |= ~[]~A
#   "<-"
~[]~A |= <>A
#   "<->"
## <>A == ~[]~A

|= [](A->B) -> ([]A->[]B)			# Ax

# "<->" [](A&B) <-> ([]A&[]B)
#   "->"
##|= [](A&B) -> ([]A&[]B)
#   "<-"
##|= ([]A&[]B) -> [](A&B)
# combined results already proven above, individually as "->" and "<-"
##|= [](A&B) <-> ([]A&[]B)
|= <>(A&B) -> (<>A&<>B)

# "<->" <>(A|B) <-> (<>A|<>B)
#   "->"
|= <>(A|B) -> (<>A|<>B)
#   "<-"
##|= (<>A|<>B) -> <>(A|B)
# combined results already proven above, individually as "->" and "<-"
##|= <>(A|B) <-> (<>A|<>B)
|= ([]A|[]B) -> [](A|B)


#
# modal Logic Square in system D
#
# []A	---contrary---	[]~A==~<>A
#   |	     contra	  |
#   v	     dictory	  v
# <>A	-sub contrary-	<>~A==~[]A


### top left to down left sub alternative
##|= []A -> <>A
### top right to down right sub alternative
##|= ~<>A -> ~[]A
### top left to top right contrary (not both true)
##|= ~([]A & []~A)
### down left to down right sub contrary (not both false)
##|= <>A | <>~A
### top left to down right contradictory
##|= []A <=>~( <>~A )
### down left to top right contradictory
##|= <>A <=>~( []~A )

# thereby note
[]~A == ~<>A
<>~A == ~[]A