Skip to content

Commit

Permalink
Merge pull request #54 from SageMathOER-CCC/intros
Browse files Browse the repository at this point in the history
Intros
  • Loading branch information
Samuel-Lubliner authored May 8, 2024
2 parents a7ad668 + 59c4a1f commit fe76179
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 52 deletions.
4 changes: 3 additions & 1 deletion source/boolean-algebra/ch-boolean-algebra.ptx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
<title>Boolean Algebra</title>

<introduction>
<p> Boolean algebra introduction paragraph here </p>
<p>
This chapter completes the preceding one by explaining how to ask Sage to decide whether a given lattice is a Boolean algebra. We also illustrate basic operations with Boolean functions.
</p>
</introduction>

<!-- include sections -->
Expand Down
4 changes: 3 additions & 1 deletion source/combinatorics/ch-combinatorics.ptx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
<title>Combinatorics</title>

<introduction>
<p> Combinatorics introduction paragraph here </p>
<p>
Counting techniques arise naturally in computer algebra as well as in basic applications in daily life. This chapter covers the treatment in Sage of the enumeration problem, like counting combinations and counting permutations as well as listing them.
</p>
</introduction>

<!-- include sections -->
Expand Down
4 changes: 3 additions & 1 deletion source/functions/ch-functions.ptx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
<title>Functions</title>

<introduction>
<p> Functions introduction paragraph here </p>
<p>
This chapter will discuss briefly the implementation of functions in Sage and delve deeper into the sequences defined by recursion, including the Fibonacci one. We show how to solve a recurrence relation using Sage.
</p>
</introduction>

<!-- include sections -->
Expand Down
17 changes: 12 additions & 5 deletions source/getting-started/sec-defining-functions.ptx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
<p>
Here we have a function that takes a name as an argument and returns a greeting:
</p>
<aside>
<title>Notes</title>
<p>
For an extra challenge, you can implement our <c>greetings</c> function more elegantly with string formatting.
</p>
</aside>
<sage>
<input>
def greetings(name):
Expand All @@ -23,7 +29,9 @@
<sage>
<input>
# Replace 'World' with your name
greetings('World')
your_name = 'World'

greetings(your_name)
</input>
</sage>
<p>
Expand All @@ -45,7 +53,8 @@
</p>
<sage>
<input>
greetings('')
no_name = ''
greetings(no_name)
</input>
</sage>
<sage>
Expand All @@ -60,9 +69,7 @@
<input>
def greetings(name):
"""
Generate a greeting message for a given name.

This function takes a name as input and returns a greeting string. It ensures the name is a string and not empty, raising a ValueError with an appropriate message if these conditions are not met.
This function takes a name and returns a greeting. It ensures the name is a string and not empty, raising a ValueError with a message if these conditions are not met.

Parameters:
- name (str): The name to include in the greeting.
Expand Down
39 changes: 1 addition & 38 deletions source/graph-theory/ch-graph-theory.ptx
Original file line number Diff line number Diff line change
Expand Up @@ -5,44 +5,7 @@

<introduction>
<p>
Applications of graphs include:
<ul>
<li>
<p>
Social interaction
</p>
</li>
<li>
<p>
Influence
</p>
</li>
<li>
<p>
Call network
</p>
</li>
<li>
<p>
World wide web
</p>
</li>
<li>
<p>
Citation graph
</p>
</li>
<li>
<p>
Collaboration
</p>
</li>
<li>
<p>
PageRank
</p>
</li>
</ul>
Sage is extremely powerful for graph theory. This chapter presents the study of graph theory with Sage, starting with a description of the Graph class through the implementation of optimization algorithms. We also illustrate Sage's graphical capabilities for visualizing graphs.
</p>
</introduction>

Expand Down
4 changes: 3 additions & 1 deletion source/lattices/ch-lattices.ptx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
<title>Lattices</title>

<introduction>
<p> Lattice introduction paragraph here </p>
<p>
This chapter builds on the partial order sets introduced earlier and explains how to ask Sage to decide whether a given poset is a lattice. Then, we show how to calculate the meet and join tables using built-in and customized Sage functions.
</p>
</introduction>

<!-- include sections -->
Expand Down
4 changes: 3 additions & 1 deletion source/logic/ch-logic.ptx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
<title>Logic</title>

<introduction>
<p> Logic introduction paragraph here </p>
<p>
In this chapter, we introduce different ways to create boolean formulas using the logical functions <c>not</c>, <c>and</c>, <c>or</c>, <c>if then</c>, and <c>iff</c>. Then, we show how to ask Sage to create a truth table from a formula and determine if an expression is a contradiction or a tautology.
</p>
</introduction>

<!-- include sections -->
Expand Down
2 changes: 1 addition & 1 deletion source/relations/ch-relations.ptx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<introduction>
<p>
Now that we've studied sets, its time to investigate the interrelationships between the elements of a set.
In this chapter, we'll explore the relationships between elements in sets, building upon the concept of "Cartesian product" introduced earlier. We'll begin by learning how to visualize relations using Sage. Then, we'll introduce some new functions that can help us determine whether these relations are equivalence or partial order relations.
</p>
</introduction>

Expand Down
4 changes: 3 additions & 1 deletion source/set-theory/ch-set-theory.ptx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
<title>Set Theory</title>

<introduction>
<p> Set theory is a fundamental branch of mathematical logic that deals with the properties and relations of sets, which are collections of objects. Developed in the late 19th century by Georg Cantor, set theory provides the foundational framework for nearly all of mathematics. It introduces the concept of infinite sets, explores the sizes of these sets, and examines operations between them. Essential to understanding mathematical structures, set theory is not only pivotal in pure mathematics but also has applications in computer science, philosophy, and linguistics. This introduction covers the basic principles and operations of set theory, providing a solid foundation for further mathematical exploration. </p>
<p>
This chapter presents the study of set theory with Sage, starting with a description of the <c>Set</c> function and its variations, then how to use it to calculate the basic set operations.
</p>
</introduction>

<!-- include sections -->
Expand Down
2 changes: 1 addition & 1 deletion source/set-theory/sec-creating-sets.ptx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title>Creating Sets</title>

<subsection xml:id="subsec-Ways-to-create-a-set">
<title>Sage Math Set</title>
<title>Set Definitions</title>
<p>
To construct a set, encase the elements within square brackets <c>[]</c>. Then, pass this <c>list</c> as an argument to the <c>Set()</c> function. It's important to note that the <c>S</c> in <c>Set()</c> should be uppercase to define a Sage set. In a set, each element is unique.
</p>
Expand Down
4 changes: 3 additions & 1 deletion source/trees/ch-trees.ptx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
<title>Trees</title>

<introduction>
<p> Trees introduction paragraph here </p>
<p>
This chapter completes the preceding one by explaining how to ask Sage to decide whether a given graph is a tree and then introduce further searching algorithms for trees.
</p>
</introduction>

<!-- include sections -->
Expand Down

0 comments on commit fe76179

Please sign in to comment.