{-# LANGUAGE PostfixOperators #-} module Drasil.DblPend.Assumptions (twoDMotion, cartSys, cartSysR, yAxisDir, startOriginSingle, startOriginDouble, firstPend, secondPend, assumpSingle, assumpDouble) where import Language.Drasil import Language.Drasil.Chunk.Concept.NamedCombinators import qualified Language.Drasil.Sentence.Combinators as S import Data.Drasil.Concepts.Documentation (assumpDom) import Data.Drasil.Concepts.Math (cartesian, xAxis, yAxis, direction, origin, positive) import Data.Drasil.Concepts.Physics (gravity, twoD, pendulum) import Drasil.DblPend.Concepts (pendMotion, firstRod, secondRod, firstObject, secondObject) assumpBasic :: [ConceptInstance] assumpBasic :: [ConceptInstance] assumpBasic = [ConceptInstance twoDMotion, ConceptInstance cartSys, ConceptInstance cartSysR, ConceptInstance yAxisDir] assumpSingle :: [ConceptInstance] assumpSingle :: [ConceptInstance] assumpSingle = [ConceptInstance] assumpBasic forall a. [a] -> [a] -> [a] ++ [ConceptInstance startOriginSingle] assumpDouble :: [ConceptInstance] assumpDouble :: [ConceptInstance] assumpDouble = [ConceptInstance] assumpSingle forall a. [a] -> [a] -> [a] ++ [ConceptInstance startOriginDouble, ConceptInstance firstPend, ConceptInstance secondPend] twoDMotion, cartSys, cartSysR, yAxisDir, startOriginSingle, startOriginDouble, firstPend, secondPend:: ConceptInstance twoDMotion :: ConceptInstance twoDMotion = forall c. Concept c => String -> Sentence -> String -> c -> ConceptInstance cic String "twoDMotion" Sentence twoDMotionDesc String "twoDMotion" ConceptChunk assumpDom cartSys :: ConceptInstance cartSys = forall c. Concept c => String -> Sentence -> String -> c -> ConceptInstance cic String "cartSys" Sentence cartSysDesc String "cartSys" ConceptChunk assumpDom cartSysR :: ConceptInstance cartSysR = forall c. Concept c => String -> Sentence -> String -> c -> ConceptInstance cic String "cartSysR" Sentence cartSysRDesc String "cartSysR" ConceptChunk assumpDom yAxisDir :: ConceptInstance yAxisDir = forall c. Concept c => String -> Sentence -> String -> c -> ConceptInstance cic String "yAxisDir" Sentence yAxisDirDesc String "yAxisDir" ConceptChunk assumpDom startOriginSingle :: ConceptInstance startOriginSingle = forall c. Concept c => String -> Sentence -> String -> c -> ConceptInstance cic String "startOrigin" Sentence startOriginDescSingle String "startOrigin" ConceptChunk assumpDom startOriginDouble :: ConceptInstance startOriginDouble = forall c. Concept c => String -> Sentence -> String -> c -> ConceptInstance cic String "startOrigin" Sentence startOriginDescDouble String "startOrigin" ConceptChunk assumpDom firstPend :: ConceptInstance firstPend = forall c. Concept c => String -> Sentence -> String -> c -> ConceptInstance cic String "firstPend" Sentence firstPendDesc String "firstPend" ConceptChunk assumpDom secondPend :: ConceptInstance secondPend = forall c. Concept c => String -> Sentence -> String -> c -> ConceptInstance cic String "secondPend" Sentence secondPendDesc String "secondPend" ConceptChunk assumpDom twoDMotionDesc :: Sentence twoDMotionDesc :: Sentence twoDMotionDesc = forall n. NounPhrase n => n -> Sentence atStartNP (forall t. NamedIdea t => t -> NP the IdeaDict pendMotion) Sentence -> Sentence -> Sentence `S.is` forall n. NamedIdea n => n -> Sentence phrase CI twoD Sentence -> Sentence -> Sentence +:+. Sentence -> Sentence sParen (CI -> Sentence getAcc CI twoD) cartSysDesc :: Sentence cartSysDesc :: Sentence cartSysDesc = forall n. NounPhrase n => n -> Sentence atStartNP (forall t. NamedIdea t => t -> NP a_ ConceptChunk cartesian) Sentence -> Sentence -> Sentence `S.is` (String -> Sentence S String "used" !.) cartSysRDesc :: Sentence cartSysRDesc :: Sentence cartSysRDesc = forall n. NounPhrase n => n -> Sentence atStartNP (forall t. NamedIdea t => t -> NP the ConceptChunk cartesian) Sentence -> Sentence -> Sentence `S.is` String -> Sentence S String "right-handed where" Sentence -> Sentence -> Sentence +:+ forall n. NounPhrase n => n -> Sentence phraseNP (forall c. NamedIdea c => c -> NP -> NP combineNINP ConceptChunk positive (ConceptChunk xAxis forall c d. (NamedIdea c, NamedIdea d) => c -> d -> NP `and_` ConceptChunk yAxis)) Sentence -> Sentence -> Sentence +:+. String -> Sentence S String "point right up" yAxisDirDesc :: Sentence yAxisDirDesc :: Sentence yAxisDirDesc = forall n. NounPhrase n => n -> Sentence atStartNP (ConceptChunk direction forall c d. (NamedIdea c, NamedIdea d) => c -> d -> NP `the_ofThe` ConceptChunk yAxis) Sentence -> Sentence -> Sentence `S.is` String -> Sentence S String "directed opposite to" Sentence -> Sentence -> Sentence +:+. forall n. NamedIdea n => n -> Sentence phrase ConceptChunk gravity startOriginDescDouble :: Sentence startOriginDescDouble :: Sentence startOriginDescDouble = forall n. NounPhrase n => n -> Sentence atStartNP (forall t. NamedIdea t => t -> NP the IdeaDict firstRod) Sentence -> Sentence -> Sentence `S.is` String -> Sentence S String "attached" Sentence -> Sentence -> Sentence `S.toThe` (forall n. NamedIdea n => n -> Sentence phrase ConceptChunk origin !.) startOriginDescSingle :: Sentence startOriginDescSingle :: Sentence startOriginDescSingle = forall n. NounPhrase n => n -> Sentence atStartNP (forall t. NamedIdea t => t -> NP the ConceptChunk pendulum) Sentence -> Sentence -> Sentence `S.is` String -> Sentence S String "attached" Sentence -> Sentence -> Sentence `S.toThe` (forall n. NamedIdea n => n -> Sentence phrase ConceptChunk origin !.) firstPendDesc:: Sentence firstPendDesc :: Sentence firstPendDesc = [Sentence] -> Sentence foldlSent[ forall n. NounPhrase n => n -> Sentence atStartNP (forall t. NamedIdea t => t -> NP the IdeaDict firstRod) Sentence -> Sentence -> Sentence +:+. String -> Sentence S String "has two sides", String -> Sentence S String "One side attaches" Sentence -> Sentence -> Sentence `S.toThe` (forall n. NamedIdea n => n -> Sentence phrase ConceptChunk origin !.), String -> Sentence S String "Another side attaches" Sentence -> Sentence -> Sentence `S.toThe` forall n. NamedIdea n => n -> Sentence phrase IdeaDict firstObject] secondPendDesc:: Sentence secondPendDesc :: Sentence secondPendDesc = [Sentence] -> Sentence foldlSent[ forall n. NounPhrase n => n -> Sentence atStartNP (forall t. NamedIdea t => t -> NP the IdeaDict secondRod) Sentence -> Sentence -> Sentence +:+. String -> Sentence S String "has two sides", String -> Sentence S String "One side attaches" Sentence -> Sentence -> Sentence `S.toThe` (forall n. NamedIdea n => n -> Sentence phrase IdeaDict firstObject !.), String -> Sentence S String "Another side attaches" Sentence -> Sentence -> Sentence `S.toThe` forall n. NamedIdea n => n -> Sentence phrase IdeaDict secondObject]