{-# 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 [ConceptInstance] -> [ConceptInstance] -> [ConceptInstance] forall a. [a] -> [a] -> [a] ++ [ConceptInstance startOriginSingle] assumpDouble :: [ConceptInstance] assumpDouble :: [ConceptInstance] assumpDouble = [ConceptInstance] assumpSingle [ConceptInstance] -> [ConceptInstance] -> [ConceptInstance] forall a. [a] -> [a] -> [a] ++ [ConceptInstance startOriginDouble, ConceptInstance firstPend, ConceptInstance secondPend] twoDMotion, cartSys, cartSysR, yAxisDir, startOriginSingle, startOriginDouble, firstPend, secondPend:: ConceptInstance twoDMotion :: ConceptInstance twoDMotion = String -> Sentence -> String -> ConceptChunk -> ConceptInstance forall c. Concept c => String -> Sentence -> String -> c -> ConceptInstance cic String "twoDMotion" Sentence twoDMotionDesc String "twoDMotion" ConceptChunk assumpDom cartSys :: ConceptInstance cartSys = String -> Sentence -> String -> ConceptChunk -> ConceptInstance forall c. Concept c => String -> Sentence -> String -> c -> ConceptInstance cic String "cartSys" Sentence cartSysDesc String "cartSys" ConceptChunk assumpDom cartSysR :: ConceptInstance cartSysR = String -> Sentence -> String -> ConceptChunk -> ConceptInstance forall c. Concept c => String -> Sentence -> String -> c -> ConceptInstance cic String "cartSysR" Sentence cartSysRDesc String "cartSysR" ConceptChunk assumpDom yAxisDir :: ConceptInstance yAxisDir = String -> Sentence -> String -> ConceptChunk -> ConceptInstance forall c. Concept c => String -> Sentence -> String -> c -> ConceptInstance cic String "yAxisDir" Sentence yAxisDirDesc String "yAxisDir" ConceptChunk assumpDom startOriginSingle :: ConceptInstance startOriginSingle = String -> Sentence -> String -> ConceptChunk -> ConceptInstance forall c. Concept c => String -> Sentence -> String -> c -> ConceptInstance cic String "startOrigin" Sentence startOriginDescSingle String "startOrigin" ConceptChunk assumpDom startOriginDouble :: ConceptInstance startOriginDouble = String -> Sentence -> String -> ConceptChunk -> ConceptInstance forall c. Concept c => String -> Sentence -> String -> c -> ConceptInstance cic String "startOrigin" Sentence startOriginDescDouble String "startOrigin" ConceptChunk assumpDom firstPend :: ConceptInstance firstPend = String -> Sentence -> String -> ConceptChunk -> ConceptInstance forall c. Concept c => String -> Sentence -> String -> c -> ConceptInstance cic String "firstPend" Sentence firstPendDesc String "firstPend" ConceptChunk assumpDom secondPend :: ConceptInstance secondPend = String -> Sentence -> String -> ConceptChunk -> ConceptInstance forall c. Concept c => String -> Sentence -> String -> c -> ConceptInstance cic String "secondPend" Sentence secondPendDesc String "secondPend" ConceptChunk assumpDom twoDMotionDesc :: Sentence twoDMotionDesc :: Sentence twoDMotionDesc = NP -> Sentence forall n. NounPhrase n => n -> Sentence atStartNP (IdeaDict -> NP forall t. NamedIdea t => t -> NP the IdeaDict pendMotion) Sentence -> Sentence -> Sentence `S.is` CI -> Sentence 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 = NP -> Sentence forall n. NounPhrase n => n -> Sentence atStartNP (ConceptChunk -> NP forall t. NamedIdea t => t -> NP a_ ConceptChunk cartesian) Sentence -> Sentence -> Sentence `S.is` (String -> Sentence S String "used" !.) cartSysRDesc :: Sentence cartSysRDesc :: Sentence cartSysRDesc = NP -> Sentence forall n. NounPhrase n => n -> Sentence atStartNP (ConceptChunk -> NP forall t. NamedIdea t => t -> NP the ConceptChunk cartesian) Sentence -> Sentence -> Sentence `S.is` String -> Sentence S String "right-handed where" Sentence -> Sentence -> Sentence +:+ NP -> Sentence forall n. NounPhrase n => n -> Sentence phraseNP (ConceptChunk -> NP -> NP forall c. NamedIdea c => c -> NP -> NP combineNINP ConceptChunk positive (ConceptChunk xAxis ConceptChunk -> ConceptChunk -> NP 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 = NP -> Sentence forall n. NounPhrase n => n -> Sentence atStartNP (ConceptChunk direction ConceptChunk -> ConceptChunk -> NP 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 +:+. ConceptChunk -> Sentence forall n. NamedIdea n => n -> Sentence phrase ConceptChunk gravity startOriginDescDouble :: Sentence startOriginDescDouble :: Sentence startOriginDescDouble = NP -> Sentence forall n. NounPhrase n => n -> Sentence atStartNP (IdeaDict -> NP forall t. NamedIdea t => t -> NP the IdeaDict firstRod) Sentence -> Sentence -> Sentence `S.is` String -> Sentence S String "attached" Sentence -> Sentence -> Sentence `S.toThe` (ConceptChunk -> Sentence forall n. NamedIdea n => n -> Sentence phrase ConceptChunk origin !.) startOriginDescSingle :: Sentence startOriginDescSingle :: Sentence startOriginDescSingle = NP -> Sentence forall n. NounPhrase n => n -> Sentence atStartNP (ConceptChunk -> NP forall t. NamedIdea t => t -> NP the ConceptChunk pendulum) Sentence -> Sentence -> Sentence `S.is` String -> Sentence S String "attached" Sentence -> Sentence -> Sentence `S.toThe` (ConceptChunk -> Sentence forall n. NamedIdea n => n -> Sentence phrase ConceptChunk origin !.) firstPendDesc :: Sentence firstPendDesc :: Sentence firstPendDesc = [Sentence] -> Sentence foldlSent[ NP -> Sentence forall n. NounPhrase n => n -> Sentence atStartNP (IdeaDict -> NP 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` (ConceptChunk -> Sentence forall n. NamedIdea n => n -> Sentence phrase ConceptChunk origin !.), String -> Sentence S String "Another side attaches" Sentence -> Sentence -> Sentence `S.toThe` IdeaDict -> Sentence forall n. NamedIdea n => n -> Sentence phrase IdeaDict firstObject] secondPendDesc :: Sentence secondPendDesc :: Sentence secondPendDesc = [Sentence] -> Sentence foldlSent[ NP -> Sentence forall n. NounPhrase n => n -> Sentence atStartNP (IdeaDict -> NP 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` (IdeaDict -> Sentence forall n. NamedIdea n => n -> Sentence phrase IdeaDict firstObject !.), String -> Sentence S String "Another side attaches" Sentence -> Sentence -> Sentence `S.toThe` IdeaDict -> Sentence forall n. NamedIdea n => n -> Sentence phrase IdeaDict secondObject]