defining app state with natural deduction