Injectivity and Surjectivity of Functions with Lists and Sets

Click For Summary
SUMMARY

The discussion focuses on the injectivity and surjectivity of two functions: seq: N -> Lists[N] and f: Lists[A] -> P(A), where f(x)=()={x1,x2,...,xn}. It concludes that the function seq is both injective and surjective, as it maps natural numbers to all possible lists of natural numbers. The function f is not injective since different lists can produce the same set, but it is surjective if every set in P(A) can be produced by some list.

PREREQUISITES
  • Understanding of injective and surjective functions
  • Familiarity with natural numbers and lists
  • Knowledge of power sets and set notation
  • Basic concepts of functions in mathematics
NEXT STEPS
  • Study the definitions and properties of injective and surjective functions
  • Learn about power sets and their applications in set theory
  • Explore examples of functions that are injective, surjective, or both
  • Investigate the implications of list and set mappings in functional programming
USEFUL FOR

Mathematics students, educators, and anyone interested in the properties of functions, particularly in the context of set theory and functional programming.

arnold28
Messages
14
Reaction score
0

Homework Statement


Are the given functions injective? Surjective?

a) seq: N -> Lists[N]

b) f: Lists[A] -> P(A), f(x)=(<x1,x2,...,xn>)={x1,x2,...,xn}

Homework Equations


The Attempt at a Solution



a) Ok so the domain contains a sequence of natural numbers.
and the range contains a list? What is that list? Is it all lists possible? If it means all lists possible, then a) is injective and surjective?
 
Physics news on Phys.org
I think the range is supposed to be the powerset of A, f will map a list to a set with the same values in it. (you might have told as a bit more about the notation used here)

Can you think of two lists that produce the same set? if so, it's not an injection

Are all the sets produced by letting f act on some list? If so, it's a surjection.
 

Similar threads

Replies
4
Views
4K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 2 ·
Replies
2
Views
6K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
1
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 14 ·
Replies
14
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 15 ·
Replies
15
Views
2K